5
0
mirror of https://github.com/cwinfo/yggdrasil-go.git synced 2024-11-10 06:20:26 +00:00

have the peer delay setting a max buffer size, in case things have unblocked in the mean time

This commit is contained in:
Arceliar 2020-05-24 17:24:50 -05:00
parent 28d6e3e605
commit 9574308545

View File

@ -303,10 +303,12 @@ 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() {
if seq == p.seq { p.Act(nil, func() {
p.drop = true if seq == p.seq {
p.max = p.queue.size + streamMsgSize p.drop = true
} p.max = p.queue.size + streamMsgSize
}
})
}) })
} }