Skip to content

Prepare the PeerSharp 5.4.1 release - #43

Merged
ligenq merged 2 commits into
mainfrom
prepare-5.4.1-release
Nov 21, 2026
Merged

ligenq merged 2 commits into
mainfrom
prepare-5.4.1-release

Conversation

@ligenq

@ligenq ligenq commented Nov 21, 2026

Copy link
Copy Markdown
Owner

The last step before releasing 5.4.1: one round of connection and tracker fixes, then the release notes.

Fixes

  • Failed encryption handshakes close the connection. A timed-out or failed MSE handshake used to fall through to a plaintext handshake on the same connection. That could only throw, because MSE bytes had already been sent and a read timeout had already closed the stream, and it was logged as Connect failed (unexpected) with a stack trace. The connection now closes and the peer's history offers plaintext next time. When our own dial deadline aborts the handshake, it is reported as a timeout and no longer counts as the peer hanging up.
  • Expected connect failures are logged quietly. Once the transport is open, including during TLS on SSL torrents, I/O failures log at Debug without a stack trace. Caller cancellation logs as cancelled, not as a timeout. Proxy setup and authentication failures still reach the error log.
  • UDP tracker timeouts are logged quietly. An announce or scrape that fails only by timing out logs at Information without a stack trace, as HttpTracker already did. Per-retry scrape logs drop from Warning to Debug. The final-failure code after each retry loop could never run, so it is removed.
  • Test fixes. FileCheckScheduleTests now waits for the stop's cancellation to reach the paused read, which fixes a race. The new logging tests share one RecordingLoggerProvider.

Release notes

  • Changelog: the 5.4.1 section is dated 2026-11-21 and lists the fixes above.
  • PeerSharp package notes: now also mention the handshake and logging changes. Still binary compatible with 5.4.0, with no public API changes.

The version, the README, the WebTorrent notes and the validation baselines were already set for 5.4.1 in #42 and stay as they are.

Validation

  • dotnet format --verify-no-changes is clean, and the Release build with warnings as errors succeeds.
  • dotnet pack with package validation succeeds for both PeerSharp and PeerSharp.WebTorrent 5.4.1.
  • The full test suite and a manual run with the sample CLI pass locally.

After merging

  1. Run the Release workflow on main with dry run on. The last dry run (on the hardening branch) failed only because the Windows Transmission interop leech stalled at 99.4%. That test has also failed on and off in scheduled runs.
  2. If the dry run passes, run it again without dry run. That creates the v5.4.1 tag and release and pushes both packages to NuGet.

🤖 Generated with Claude Code

ligenq and others added 2 commits November 21, 2026 13:02
…r failures

A failed or timed-out MSE handshake used to fall through to a plaintext
handshake on the same connection. MSE bytes had already been written, and a
read timeout had already closed the stream, so that attempt could only throw
and was logged as "Connect failed (unexpected)" with a stack trace. The
connection now closes and the peer's history offers plaintext next time. When
our own dial deadline aborts the handshake, it is reported as a timeout and no
longer counts as the peer hanging up.

Once the transport is open, including during TLS on SSL torrents, I/O failures
are logged at Debug without a stack trace. Caller cancellation is logged as
cancelled. Proxy setup and authentication failures still reach the error log.

UDP tracker announces and scrapes that fail only by timing out are logged at
Information without a stack trace, matching HttpTracker. Per-retry scrape logs
drop from Warning to Debug. The final-failure code after each retry loop could
never run, because the last attempt's exception skips the per-attempt catches,
so it is removed.

FileCheckScheduleTests now also waits for the stop's cancellation to reach the
paused read before releasing it. The tests share one RecordingLoggerProvider.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The changelog's 5.4.1 section is dated today. The PeerSharp package notes
now also say that failed encryption handshakes close cleanly and that
unresponsive peers and UDP trackers are logged without error-level stack
traces. No public API changes, so it is still binary compatible with 5.4.0.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@ligenq
ligenq merged commit c8feb61 into main Nov 21, 2026
23 of 24 checks passed
@ligenq
ligenq deleted the prepare-5.4.1-release branch November 21, 2026 12:26
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