mirror of
https://github.com/octoleo/syncthing.git
synced 2024-12-22 10:58:57 +00:00
Bind to IPv6 multicast group instead of ::
This makes it possible to run multiple instances on the same box, all receiving local discovery packets. Tested on Mac, Windows, supposed to work on at least Linux too. For Windows, there may be issues with XP and earlier, but meh...
This commit is contained in:
parent
037be433f8
commit
cae120fd4d
@ -8,7 +8,6 @@ package beacon
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"fmt"
|
||||
"net"
|
||||
|
||||
"golang.org/x/net/ipv6"
|
||||
@ -28,7 +27,7 @@ func NewMulticast(addr string) (*Multicast, error) {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
conn, err := net.ListenPacket("udp6", fmt.Sprintf("[::]:%d", gaddr.Port))
|
||||
conn, err := net.ListenPacket("udp6", addr)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user