mirror of
https://github.com/yggdrasil-network/yggdrasil-go.git
synced 2025-04-28 14:15:06 +03:00
tcp reconnect bufix, test with bufio, and switch back to tcp auto-peering by default to continue testing
This commit is contained in:
parent
a21a039b57
commit
a81c361484
2 changed files with 29 additions and 15 deletions
|
@ -118,7 +118,7 @@ func generateConfig() *nodeConfig {
|
|||
cfg.Multicast = true
|
||||
cfg.LinkLocal = ""
|
||||
cfg.IfName = "auto"
|
||||
cfg.IfMTU = 65535
|
||||
cfg.IfMTU = 1280 //65535
|
||||
if runtime.GOOS == "windows" {
|
||||
cfg.IfTAPMode = true
|
||||
} else {
|
||||
|
@ -177,7 +177,7 @@ func (n *node) listen() {
|
|||
saddr := addr.String()
|
||||
//if _, isIn := n.peers[saddr]; isIn { continue }
|
||||
//n.peers[saddr] = struct{}{}
|
||||
n.core.DEBUG_maybeSendUDPKeys(saddr) // FIXME? can result in 2 connections per peer
|
||||
n.core.DEBUG_addTCPConn(saddr) // FIXME? can result in 2 connections per peer
|
||||
//fmt.Println("DEBUG:", "added multicast peer:", saddr)
|
||||
}
|
||||
}
|
||||
|
@ -188,7 +188,7 @@ func (n *node) announce() {
|
|||
panic(err)
|
||||
}
|
||||
var anAddr net.TCPAddr
|
||||
myAddr := n.core.DEBUG_getGlobalUDPAddr()
|
||||
myAddr := n.core.DEBUG_getGlobalTCPAddr()
|
||||
anAddr.Port = myAddr.Port
|
||||
destAddr, err := net.ResolveUDPAddr("udp6", multicastAddr)
|
||||
if err != nil {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue