Merge pull request #686 from Arceliar/multicast

maybe fix multicast deadlock on darwin
This commit is contained in:
Arceliar 2020-05-09 06:07:16 -05:00 committed by GitHub
commit dafaef898b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -33,14 +33,14 @@ var awdlGoroutineStarted bool
func (m *Multicast) _multicastStarted() { func (m *Multicast) _multicastStarted() {
C.StopAWDLBrowsing() C.StopAWDLBrowsing()
for intf := range m.Interfaces() { for intf := range m._interfaces {
if intf == "awdl0" { if intf == "awdl0" {
C.StartAWDLBrowsing() C.StartAWDLBrowsing()
break break
} }
} }
m.platformhandler = time.AfterFunc(time.Minute, func() { m.platformhandler = time.AfterFunc(time.Minute, func() {
m.Act(m, m._multicastStarted) m.Act(nil, m._multicastStarted)
}) })
} }