mirror of
https://github.com/cwinfo/yggdrasil-go.git
synced 2025-09-18 13:22:30 +00:00
Switch connAddr (udp map key) from string to a struct that allocates less. Reduce some other allocations. Use larger channel buffers to reduce backpressure from runtime jitter.
This commit is contained in:
@@ -164,8 +164,8 @@ func (ss *sessions) createSession(theirPermKey *boxPubKey) *sessionInfo {
|
||||
sinfo.myHandle = *newHandle()
|
||||
sinfo.theirAddr = *address_addrForNodeID(getNodeID(&sinfo.theirPermPub))
|
||||
sinfo.theirSubnet = *address_subnetForNodeID(getNodeID(&sinfo.theirPermPub))
|
||||
sinfo.send = make(chan []byte, 1)
|
||||
sinfo.recv = make(chan *wire_trafficPacket, 1)
|
||||
sinfo.send = make(chan []byte, 1024)
|
||||
sinfo.recv = make(chan *wire_trafficPacket, 1024)
|
||||
go sinfo.doWorker()
|
||||
sinfo.time = time.Now()
|
||||
// Do some cleanup
|
||||
|
Reference in New Issue
Block a user