From b4b48686e1f48847e8c341fcb1dc7337afb8a983 Mon Sep 17 00:00:00 2001 From: David Florness Date: Tue, 9 Jun 2020 00:54:36 -0600 Subject: [PATCH] Don't close the close channel Closing it causing anyone reading to yield zero. --- voter.go | 1 - 1 file changed, 1 deletion(-) diff --git a/voter.go b/voter.go index 234d7ce..5cb6365 100644 --- a/voter.go +++ b/voter.go @@ -97,7 +97,6 @@ func handleCmd(cmd string, rw *bufio.ReadWriter, stream network.Stream) { panic(err) } election.close <- numPeers - close(election.close) election.closed = true case "shake": election.Lock() -- 2.38.4