mirror of https://github.com/status-im/go-waku.git
fix: close addrChan in the writer goroutine (#277)
This commit is contained in:
parent
a549337a42
commit
fb6d59ff33
|
@ -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()
|
||||
|
||||
|
|
Loading…
Reference in New Issue