mirror of
https://github.com/yggdrasil-network/yggdrasil-go.git
synced 2025-04-28 22:25:07 +03:00
Wake up AWDL on Darwin if awdl0 is an enabled multicast interface
This commit is contained in:
parent
58757bb955
commit
e99903bf72
5 changed files with 41 additions and 5 deletions
|
@ -50,7 +50,7 @@ func (m *multicast) start() error {
|
|||
}
|
||||
listenString := fmt.Sprintf("[::]:%v", addr.Port)
|
||||
lc := net.ListenConfig{
|
||||
Control: multicastReuse,
|
||||
Control: m.multicastReuse,
|
||||
}
|
||||
conn, err := lc.ListenPacket(context.Background(), "udp6", listenString)
|
||||
if err != nil {
|
||||
|
@ -61,6 +61,7 @@ func (m *multicast) start() error {
|
|||
// Windows can't set this flag, so we need to handle it in other ways
|
||||
}
|
||||
|
||||
m.multicastWake()
|
||||
go m.listen()
|
||||
go m.announce()
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue