mirror of
https://github.com/yggdrasil-network/yggdrasil-go.git
synced 2024-11-30 13:35:19 +00:00
commit
dbc3b9b4c4
@ -290,8 +290,8 @@ func (p *peer) _handleIdle() {
|
|||||||
break
|
break
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if len(packets) > 0 {
|
|
||||||
p.seq++
|
p.seq++
|
||||||
|
if len(packets) > 0 {
|
||||||
p.bytesSent += uint64(size)
|
p.bytesSent += uint64(size)
|
||||||
p.intf.out(packets)
|
p.intf.out(packets)
|
||||||
p.max = p.queue.size
|
p.max = p.queue.size
|
||||||
@ -303,11 +303,13 @@ func (p *peer) _handleIdle() {
|
|||||||
|
|
||||||
func (p *peer) dropFromQueue(from phony.Actor, seq uint64) {
|
func (p *peer) dropFromQueue(from phony.Actor, seq uint64) {
|
||||||
p.Act(from, func() {
|
p.Act(from, func() {
|
||||||
|
p.Act(nil, func() {
|
||||||
if seq == p.seq {
|
if seq == p.seq {
|
||||||
p.drop = true
|
p.drop = true
|
||||||
p.max = p.queue.size + streamMsgSize
|
p.max = p.queue.size + streamMsgSize
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
// This wraps the packet in the inner (ephemeral) and outer (permanent) crypto layers.
|
// This wraps the packet in the inner (ephemeral) and outer (permanent) crypto layers.
|
||||||
|
Loading…
Reference in New Issue
Block a user