Skip to content

Add opt-in ReconnectingTransport for recreated Unix sockets - #1

Merged
bk203 merged 1 commit into
masterfrom
feature/unix-socket-reconnect
Jun 5, 2026
Merged

bk203 merged 1 commit into
masterfrom
feature/unix-socket-reconnect

Conversation

@bk203

@bk203 bk203 commented Jun 5, 2026

Copy link
Copy Markdown
Owner

Summary

  • Invalidate stale socket fds on ConnectionException so dead connections are not reused
  • Make UnixSocketTransport reconnectable with socket-file polling when charon recreates the path
  • Add opt-in ReconnectingTransport wrapper for automatic reconnect/retry on single I/O calls in long-lived loops
  • Document v1 limitations (no Session-level event replay or multi-packet command retry)

Test plan

  • composer test (61 tests)
  • composer stan (PHPStan level 8)
  • Unit tests for stream invalidation, UnixSocketTransport::reconnect(), and ReconnectingTransport retry
  • Integration test: Session::version() survives simulated server restart

Invalidate stale fds on connection failure, make UnixSocketTransport reconnectable, and wrap it for automatic recovery in long-lived loops.
@bk203
bk203 merged commit 9f4130d into master Jun 5, 2026
1 check passed
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