5
0
mirror of https://github.com/cwinfo/yggdrasil-go.git synced 2024-11-10 02:50:27 +00:00

fix a crash when shutting down if no multicast interfaces are configured

This commit is contained in:
Arceliar 2019-10-25 18:40:09 -05:00
parent 1fbab17b37
commit cfc1e6b83d

View File

@ -124,7 +124,9 @@ func (m *Multicast) _stop() error {
if m.platformhandler != nil {
m.platformhandler.Stop()
}
m.sock.Close()
if m.sock != nil {
m.sock.Close()
}
return nil
}