From: Matt Joiner Date: Tue, 3 Sep 2024 05:18:54 +0000 (+1000) Subject: tracker/udp: Reset connection ID on error response X-Git-Tag: v1.57.0~1 X-Git-Url: http://www.git.stargrave.org/?a=commitdiff_plain;h=2a77ecd5e7f2974c60752dc6d2630a299835b09f;p=btrtrc.git tracker/udp: Reset connection ID on error response --- diff --git a/tracker/udp/client.go b/tracker/udp/client.go index 077cc7a4..4664643d 100644 --- a/tracker/udp/client.go +++ b/tracker/udp/client.go @@ -225,6 +225,9 @@ func (cl *Client) request( // udp://tracker.torrent.eu.org:451/announce frequently returns "Connection ID // missmatch.\x00" err = ErrorResponse{Message: string(dr.Body)} + // Force a reconnection. Probably any error is worth doing this for, but the one we're + // specifically interested in is ConnectionIdMissmatchNul. + cl.connIdIssued = time.Time{} } else { err = fmt.Errorf("unexpected response action %v", dr.Header.Action) }