mirror of
https://github.com/anyproto/anytype-heart.git
synced 2025-06-08 05:47:07 +09:00
localdiscovery fixes:
replace zeroconf with fork; sort interfaces; disable ipv6, tollerate long zeroconf shutodown
This commit is contained in:
parent
9a0c0361a0
commit
54af31a2af
5 changed files with 186 additions and 98 deletions
|
@ -3,7 +3,11 @@
|
|||
|
||||
package addrs
|
||||
|
||||
import "net"
|
||||
import (
|
||||
"net"
|
||||
|
||||
"github.com/anytypeio/go-anytype-middleware/util/slice"
|
||||
)
|
||||
|
||||
func SetInterfaceAddrsGetter(getter InterfaceAddrsGetter) {}
|
||||
|
||||
|
@ -28,5 +32,9 @@ func GetInterfacesAddrs() (iAddrs InterfacesAddrs, err error) {
|
|||
return
|
||||
}
|
||||
iAddrs.Interfaces = ifaces
|
||||
|
||||
iAddrs.Interfaces = slice.Filter(iAddrs.Interfaces, func(iface net.Interface) bool {
|
||||
return iface.Flags&net.FlagUp != 0 && iface.Flags&net.FlagMulticast != 0
|
||||
})
|
||||
return
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue