requesting.go | 6 ++++++ diff --git a/requesting.go b/requesting.go index d43114138ed4f081e2384df82b8330d0991402ff..c1575885d281605823bceba42eb584578b62b396 100644 --- a/requesting.go +++ b/requesting.go @@ -144,6 +144,12 @@ ret := t.pendingRequests.Get(index) if current { ret-- } + // I have a hunch that this could trigger for requests for chunks that are choked and not + // allowed fast, since the current conn shouldn't already be included. It's a very specific + // circumstance, and if it triggers I will fix it. + if ret < 0 { + panic(ret) + } return ret } ml := multiless.New()