]> Sergey Matveev's repositories - btrtrc.git/commit
Don't reconnect before sending requests with current conn ID
authorMatt Joiner <anacrolix@gmail.com>
Mon, 20 Feb 2023 04:49:55 +0000 (15:49 +1100)
committerMatt Joiner <anacrolix@gmail.com>
Mon, 20 Feb 2023 04:49:55 +0000 (15:49 +1100)
commit63982c3c809c837dde36b9e5d54ef4c576ed5891
tree2f23d46f5279e4a890d26ccb9e3365fc5d6dcd49
parente8971ea0f1bfb26e2e05eea6e98a547dfb231bb9
Don't reconnect before sending requests with current conn ID

The tracker udp://tracker.torrent.eu.org:451/announce gives `error response: "Connection ID missmatch.\x00"` every 2 minutes when under heavy use. I suspect that reconnect requests are sent just after the connection ID is confirmed as not stale, but before it used for a request, and the server rejects the request after processing the reconnect first.

It might also just be that that tracker server implementation is lazy and marks everything stale on regular boundaries.
go.mod
tracker/udp/client.go
tracker/udp/udp_test.go