libtorrent icon indicating copy to clipboard operation
libtorrent copied to clipboard

"Warning message" from some trackers when a torrent isn't registered.

Open montoner0 opened this issue 6 years ago • 4 comments

Some trackers send "warning message" instead of a failure when a torrent is not registered on the tracker. Looks like this:

d8:intervali3030e12:min intervali3030e5:peers6:S‹™жЊЄ15:warning message22:Torrent not registerede

The change will turn this warning into an error.

montoner0 avatar Jun 04 '19 22:06 montoner0

Coverage Status

Coverage decreased (-0.008%) to 17.889% when pulling 39f4ec8b611ddba0926214a0be2f1610e4fd8ef2 on montoner0:master into 3a6a61a4138048134f9048aef81a52f9bf821b29 on rakshasa:master.

coveralls avatar Jun 04 '19 23:06 coveralls

warning message: (new, optional) Similar to failure reason, but the response still gets processed normally. The warning message is shown just like an error.

I don't think it would be correct to fail the tracker reply based on words in the warning message, it should instead have a way of both processing the reply and displaying the message in the client.

rakshasa avatar Jun 08 '19 04:06 rakshasa

Agree, it would be nice to have some more flexible solution. But for know, as a quick hack it should be enough. Or it would be better to register this as an issue?

montoner0 avatar Jun 08 '19 04:06 montoner0

I'm guessing the one of the reasons tracker admins were even using warning message instead of failure message was to work around rTorrent's behavior of ignoring intervals on properly-bencoded tracker failures. Merging this would mean it would go back to the "announce every 300 seconds" pattern, instead of the 3030 being requested in the response you posted. I've opened a PR here to tell libtorrent to respect min interval here https://github.com/rakshasa/libtorrent/pull/246, but even with that fix, I'm not sure it's worth playing whack-a-mole in terms of which keys are error codes and which aren't.

kannibalox avatar Sep 22 '23 04:09 kannibalox