mirror of
https://github.com/logos-messaging/logos-messaging-go.git
synced 2026-01-04 06:53:06 +00:00
Recover from panic on close
This commit is contained in:
parent
b26859fc6a
commit
b7a0c8fa18
@ -241,6 +241,12 @@ func (d *DiscoveryV5) Stop() {
|
|||||||
|
|
||||||
d.wg.Wait()
|
d.wg.Wait()
|
||||||
|
|
||||||
|
defer func() {
|
||||||
|
if r := recover(); r != nil {
|
||||||
|
d.log.Info("recovering from panic and quitting")
|
||||||
|
}
|
||||||
|
}()
|
||||||
|
|
||||||
close(d.peerCh)
|
close(d.peerCh)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user