From fb6d59ff3333a1074c4adf538ce352567231754b Mon Sep 17 00:00:00 2001 From: Steven Normore Date: Mon, 1 Aug 2022 20:16:52 -0400 Subject: [PATCH] fix: close addrChan in the writer goroutine (#277) --- waku/v2/node/wakunode2.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/waku/v2/node/wakunode2.go b/waku/v2/node/wakunode2.go index 9e914642..6c544cc0 100644 --- a/waku/v2/node/wakunode2.go +++ b/waku/v2/node/wakunode2.go @@ -212,6 +212,7 @@ func (w *WakuNode) checkForAddressChanges() { for { select { case <-w.quit: + close(w.addrChan) return case <-first: w.log.Info("listening", logging.MultiAddrs("multiaddr", addrs...)) @@ -323,7 +324,6 @@ func (w *WakuNode) Stop() { defer w.cancel() close(w.quit) - close(w.addrChan) w.bcaster.Close()