From: Matt Joiner Date: Mon, 18 Oct 2021 10:50:13 +0000 (+1100) Subject: Don't panic on request refresh if there are no existing requests X-Git-Tag: v1.34.0^2~26 X-Git-Url: http://www.git.stargrave.org/?a=commitdiff_plain;h=aca3924c5e0f835a2237fe65e3374adc92adf702;p=btrtrc.git Don't panic on request refresh if there are no existing requests --- diff --git a/client.go b/client.go index 179031d0..1efd9896 100644 --- a/client.go +++ b/client.go @@ -973,7 +973,8 @@ func (c *PeerConn) updateRequestsTimerFunc() { return } if c.actualRequestState.Requests.IsEmpty() { - panic("updateRequestsTimer should have been stopped") + // If there are no outstanding requests, then a request update should have already run. + return } c.updateRequests("updateRequestsTimer") }