diff --git a/src/multicast/multicast.go b/src/multicast/multicast.go index 206edab6..4e0b4f35 100644 --- a/src/multicast/multicast.go +++ b/src/multicast/multicast.go @@ -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 }