From cfc1e6b83d56585bd984fd71ed4f077bdf079d9a Mon Sep 17 00:00:00 2001 From: Arceliar Date: Fri, 25 Oct 2019 18:40:09 -0500 Subject: [PATCH] fix a crash when shutting down if no multicast interfaces are configured --- src/multicast/multicast.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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 }