mirror of
https://github.com/yggdrasil-network/yggdrasil-go.git
synced 2024-11-23 18:15:24 +00:00
commit
55ee8f1afa
@ -170,11 +170,7 @@ func (r *router) sendPacket(bs []byte) {
|
|||||||
// Don't continue - drop the packet
|
// Don't continue - drop the packet
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
select {
|
sinfo.send <- bs
|
||||||
case sinfo.send <- bs:
|
|
||||||
default:
|
|
||||||
util_putBytes(bs)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -225,11 +221,7 @@ func (r *router) handleTraffic(packet []byte) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
//go func () { sinfo.recv<-&p }()
|
//go func () { sinfo.recv<-&p }()
|
||||||
select {
|
sinfo.recv <- &p
|
||||||
case sinfo.recv <- &p:
|
|
||||||
default:
|
|
||||||
util_putBytes(p.payload)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (r *router) handleProto(packet []byte) {
|
func (r *router) handleProto(packet []byte) {
|
||||||
|
@ -173,7 +173,7 @@ func (n *node) listen() {
|
|||||||
saddr := addr.String()
|
saddr := addr.String()
|
||||||
//if _, isIn := n.peers[saddr]; isIn { continue }
|
//if _, isIn := n.peers[saddr]; isIn { continue }
|
||||||
//n.peers[saddr] = struct{}{}
|
//n.peers[saddr] = struct{}{}
|
||||||
n.core.DEBUG_addTCPConn(saddr) // FIXME? can result in 2 connections per peer
|
n.core.DEBUG_addTCPConn(saddr)
|
||||||
//fmt.Println("DEBUG:", "added multicast peer:", saddr)
|
//fmt.Println("DEBUG:", "added multicast peer:", saddr)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user