Keep tracker shares alive for 6 minutes, then let them go

Both default trackers closed the socket of a peer that announced only
once, after about 2 and 3 minutes, and the card then wrongly said no
tracker was reachable. Sender and receiver now announce again on the
interval the tracker names (at least 30 s apart, whatever it names), the
receiver with its same offer.

A share, or a receiver looking for one, gives up after 6 minutes without
a download: its tracker sockets close and the card says nobody came. A
peer connected by then still gets its turn, the transfer itself has no
time limit. The sender's code shows until when it is valid and is marked
no longer valid, without Copy, once it expired or the share failed.

A receiver that lost every tracker now closes its peer connections too,
and the expiry timer goes with the session when it is cancelled, fails
or the download starts.

Tests fast-forward the page clock: re-announcing and expiry on both sides
against mocked trackers, no timer or connection left after cancelled and
failed sessions, and a live download after the deadline passed during
the security check.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
SchluffeandClaude Opus 5.5 committed 2026-10-24 17:55:45 +02:00
1 parent a35bd71ca7
commit 2167b528b2
5 files changed
+242 -21

No files matched your search

+1 -1
View File
@@ -6,7 +6,7 @@ size limit: the file goes directly to the other person and is never stored on a
## How to send a file
1. **Sender:** open HellCon, drop a file onto the Send card and click **Share via tracker**. You get
an 8 character code. Tell it to the receiver.
an 8 character code. Tell it to the receiver, it works for 6 minutes.
2. **Receiver:** open HellCon, enter the code under Receive and click **Receive**.
3. **Both:** compare the security check (see below) and click **Codes match**.
4. **Receiver:** you now see the file's name and size. Click **Download** to save it.