mirror of
https://github.com/cwinfo/yggdrasil-go.git
synced 2024-11-22 06:00:28 +00:00
commit
dbc3b9b4c4
@ -290,8 +290,8 @@ func (p *peer) _handleIdle() {
|
||||
break
|
||||
}
|
||||
}
|
||||
p.seq++
|
||||
if len(packets) > 0 {
|
||||
p.seq++
|
||||
p.bytesSent += uint64(size)
|
||||
p.intf.out(packets)
|
||||
p.max = p.queue.size
|
||||
@ -303,10 +303,12 @@ func (p *peer) _handleIdle() {
|
||||
|
||||
func (p *peer) dropFromQueue(from phony.Actor, seq uint64) {
|
||||
p.Act(from, func() {
|
||||
if seq == p.seq {
|
||||
p.drop = true
|
||||
p.max = p.queue.size + streamMsgSize
|
||||
}
|
||||
p.Act(nil, func() {
|
||||
if seq == p.seq {
|
||||
p.drop = true
|
||||
p.max = p.queue.size + streamMsgSize
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user