Skip to content

chore(torrent): name the connection in the uTP status report - #540

Merged
linroid merged 1 commit into
mainfrom
chore/utp-report-connection-id
Oct 13, 2026
Merged

linroid merged 1 commit into
mainfrom
chore/utp-report-connection-id

Conversation

@linroid

@linroid linroid commented Oct 13, 2026

Copy link
Copy Markdown
Owner

What changed

UtpEndpoint's 10-second report of connections with data in flight now prints the socket's receive ID:

uTP PeerEndpoint(host=…, port=…) id=<receiveId>: state=FIN_SENT inFlight=… timeouts=… ack=… seq=…

Why

A desktop log seemed to show uTP sockets stuck in FIN_SENT for 29 minutes with unchanged timeouts=6 timeout=32000ms. Investigation showed the timeouts work as intended. The lines came from several successive connections to the same peer. Each connection gave up within about 2 minutes, as UtpSocket.tick should make it. The report named only the peer, so these connections looked like one.

For example, the logged connections to 49.216.222.250:57821 from 20:36 to 21:05:

First line Last line ack / seq last timeouts
20:36:17 20:38:08 57334 / 246 7
20:40:18 20:42:18 23660 / 21 7
20:51:30 20:53:20 37431 / 21 7
20:58:11 21:00:11 30871 / 21 7
21:04:02 21:05:02 22200 / 21 6 (app restarted)

Across about 2,700 connections in the three log files, none kept the same timeouts/timeout for longer than that timeout plus one report interval.

Notes for reviewers

  • Logging only; no behavior change. :library:torrent:jvmTest --tests '*Utp*' passes.

The 10-second report of connections with data in flight named only the
peer, so successive connections to one peer read as one connection stuck
for half an hour. Print the socket's receive ID too.
@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-13T14:27:37.092504Z c540e17 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@github-actions

Copy link
Copy Markdown
Contributor

Test Results

 1 871 files  ±0   1 898 suites  ±0   22m 27s ⏱️ -25s
12 693 tests ±0  12 448 ✅ ±0  245 💤 ±0  0 ❌ ±0 
15 178 runs  ±0  14 933 ✅ ±0  245 💤 ±0  0 ❌ ±0 

Results for commit c540e17. ± Comparison against base commit 8fa48e3.

@linroid
linroid merged commit ff8480b into main Oct 13, 2026
15 checks passed
@linroid
linroid deleted the chore/utp-report-connection-id branch October 13, 2026 14:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant