From: Matt Joiner Date: Sat, 4 Nov 2017 05:58:38 +0000 (+1100) Subject: Improve upload rate limit burst size panic message X-Git-Tag: v1.0.0~358 X-Git-Url: http://www.git.stargrave.org/?a=commitdiff_plain;h=426c6fec65eb7af2683142f2dfb4f25b8acb551b;p=btrtrc.git Improve upload rate limit burst size panic message Should help with #202. --- diff --git a/connection.go b/connection.go index faa7c922..b4c9078c 100644 --- a/connection.go +++ b/connection.go @@ -1088,7 +1088,7 @@ another: for r := range c.PeerRequests { res := cl.uploadLimit.ReserveN(time.Now(), int(r.Length)) if !res.OK() { - panic(res) + panic(fmt.Sprintf("upload rate limiter burst size < %d", r.Length)) } delay := res.Delay() if delay > 0 {