fix: close addrChan in the writer goroutine (#277)

This commit is contained in:
Steven Normore 2022-08-01 20:16:52 -04:00 committed by GitHub
parent a549337a42
commit fb6d59ff33
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -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()