Files
UNIT3D-Community-Edition/app/Http/Controllers/AnnounceController.php
Roardom 67abd92364 fix: only send warning message when slot limited
If a user has started a torrent, the torrent client will cache peers, which the user may then pause and clear those peers out of the peerlist. A user might then start enough torrents to fill their download slots, and then resume the originally paused torrents, allowing them to download more torrents than their slot limits allow. When this happens, we send a failure message and don't send a peerlist. However, because the torrent client already cached peers, it will continue downloading the torrent and sending announces. However, libtorrent clients will continue sending started events until they receive a successful announce without a failure message. The logic in our announce hard codes the peer's uploaded/downloaded values to 0 on any started event. This means that all of the deltas are recorded as 0 until the user completes the torrent, at which point it saves the currently uploaded/downloaded values and only saves the delta once the event is no longer a started event. This PR uses a warning message instead of a failure message, that way the response will be assumed to be successful, but will still provide a message to the client that will show up in the trackers tab, and the client will not continue sending started events.
2024-02-20 18:20:05 +00:00

24 KiB