From 7778a47a8f224cf4e16cf8008fbed62d8ee18ceb Mon Sep 17 00:00:00 2001 From: Arceliar Date: Sun, 24 May 2020 15:46:18 -0500 Subject: [PATCH] fix darwin compile problem --- src/multicast/multicast_darwin.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/multicast/multicast_darwin.go b/src/multicast/multicast_darwin.go index 91cb5aee..ceff5b44 100644 --- a/src/multicast/multicast_darwin.go +++ b/src/multicast/multicast_darwin.go @@ -32,6 +32,9 @@ import ( var awdlGoroutineStarted bool func (m *Multicast) _multicastStarted() { + if !m.isOpen { + return + } C.StopAWDLBrowsing() for intf := range m._interfaces { if intf == "awdl0" { @@ -39,7 +42,7 @@ func (m *Multicast) _multicastStarted() { break } } - m.platformhandler = time.AfterFunc(time.Minute, func() { + time.AfterFunc(time.Minute, func() { m.Act(nil, m._multicastStarted) }) }