possibly reduce multicast cpu usage even more

This commit is contained in:
Arceliar 2020-05-02 17:23:20 -05:00
parent 127b7e311c
commit 02e1cb180d
5 changed files with 32 additions and 21 deletions

View file

@ -31,7 +31,7 @@ import (
var awdlGoroutineStarted bool
func (m *Multicast) multicastStarted() {
func (m *Multicast) _multicastStarted() {
C.StopAWDLBrowsing()
for intf := range m.Interfaces() {
if intf == "awdl0" {
@ -40,7 +40,7 @@ func (m *Multicast) multicastStarted() {
}
}
m.platformhandler = time.AfterFunc(time.Minute, func() {
m.Act(m, m.multicastStarted)
m.Act(m, m._multicastStarted)
})
}