From 426c6fec65eb7af2683142f2dfb4f25b8acb551b Mon Sep 17 00:00:00 2001
From: Matt Joiner <anacrolix@gmail.com>
Date: Sat, 4 Nov 2017 16:58:38 +1100
Subject: [PATCH] Improve upload rate limit burst size panic message

Should help with #202.
---
 connection.go | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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 {
-- 
2.51.0