Skip to content

Commit

Permalink
tracker/udp: Reset connection ID on error response
Browse files Browse the repository at this point in the history
  • Loading branch information
anacrolix committed Sep 3, 2024
1 parent 75c3321 commit 2a77ecd
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions tracker/udp/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down

0 comments on commit 2a77ecd

Please sign in to comment.