fix: close channel after waiting for goroutines to stop (#444)

This commit is contained in:
RichΛrd 2023-02-09 09:03:05 -04:00 committed by GitHub
parent 1cebf21942
commit c55a979af4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

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