mirror of
https://github.com/status-im/go-waku.git
synced 2025-01-14 15:54:20 +00:00
fix: close channel after waiting for goroutines to stop (#444)
This commit is contained in:
parent
1cebf21942
commit
c55a979af4
@ -408,9 +408,9 @@ func (w *WakuNode) Stop() {
|
||||
|
||||
w.host.Close()
|
||||
|
||||
close(w.enrChangeCh)
|
||||
|
||||
w.wg.Wait()
|
||||
|
||||
close(w.enrChangeCh)
|
||||
}
|
||||
|
||||
// Host returns the libp2p Host used by the WakuNode
|
||||
|
Loading…
x
Reference in New Issue
Block a user