Repository navigation
Handle unsupported "paused" announces without closing the connection - #98
Closed
jasminsehic wants to merge 3 commits into
Closed
jasminsehic wants to merge 3 commits into
jasminsehic wants to merge 3 commits into
Conversation
This was referenced Oct 11, 2026
Closed
Member
|
Thanks for the report and the detailed references — they were very helpful. We fixed this on wt-tracker: 5fdad75 · wt-tracker-rust: Novage/wt-tracker-rust@334badd. Closing this in favour of those commits. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Handle
event: "paused"explicitly inFastTracker.processMessage()rather than treating it as an unknown announce event.The tracker sends an announce failure response with
failure reason: "unsupported announce event: paused"and includesinfo_hashwhen it is a string. It does not throw, so the WebSocket transport's connection-closing error path is not triggered. Other unsupported announce events continue to throw as before.Why
The
pausedannounce event has an established history in the BitTorrent ecosystem and is sent by WebTorrent-capable clients.event=pausedfor partial seeds. BEP 21paused, to WebSocket JSON messages.pausedclient event and was merged on 1 June 2022, shipping in v9.19.0. The reference implementation handles the event as an update, treating it as a start if the peer is not already in the swarm.This change is intentionally limited to the
pausedevent. It does not implement BEP 21 partial-seed tracking or change swarm membership; it returns an explicit failure response without disrupting the connection.Implementation
event: "paused"in the announce-event fallback.#sendMessagecallback.info_hashonly when it is a string.FastTrackerunit test that verifies the failure response and then processes a subsequent valid announce using the same tracker instance and connection context.The PR validation workflow is also updated from Node 20 to Node 24, matching the main GH workflow. The current ESLint 10 configuration rejects the configured TypeScript tsconfig flag under Node 20, preventing the pre-existing PR workflow from reaching build and test steps.