From cf2edc99d1d7d16316c30522c4fac0be3a45da34 Mon Sep 17 00:00:00 2001 From: Arceliar Date: Sun, 17 May 2020 13:32:58 -0500 Subject: [PATCH] correctly set peer.max --- src/yggdrasil/peer.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/yggdrasil/peer.go b/src/yggdrasil/peer.go index 02e92f9a..339ea5a7 100644 --- a/src/yggdrasil/peer.go +++ b/src/yggdrasil/peer.go @@ -306,9 +306,7 @@ func (p *peer) _handleIdle() { p.seq++ p.bytesSent += uint64(size) p.intf.out(packets) - if p.drop { - p.max = p.queue.size - } + p.max = p.queue.size } else { p.idle = true p.drop = false @@ -319,6 +317,7 @@ 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 } }) }