Skip to content

fix: complete WebSocket shutdown handshake#141

Open
franciscojavierarceo wants to merge 4 commits into
mainfrom
codex/fix-websocket-shutdown-race
Open

fix: complete WebSocket shutdown handshake#141
franciscojavierarceo wants to merge 4 commits into
mainfrom
codex/fix-websocket-shutdown-race

Conversation

@franciscojavierarceo

Copy link
Copy Markdown
Collaborator

Summary

  • Complete the WebSocket close handshake after draining an active response during shutdown.
  • Reject post-shutdown WebSocket requests before they can start inference.
  • Make the shutdown regression deterministic with a ping/pong receipt barrier and strict close acknowledgment.

This fixes the Linux CI race observed at caf6bf1 where unread client frames could make socket teardown surface ECONNRESET after the active response completed.

Test Plan

  • cargo fmt -- --check
  • cargo clippy --all-targets -- -D warnings
  • cargo test
  • uvx pre-commit run --all-files
  • 100 repeated runs of test_websocket_shutdown_drains_active_response_before_closing
  • gstack /review with specialist, adversarial, and structured re-review gates
  • Claude read-only worktree review

Signed-off-by: Francisco Javier Arceo <farceo@redhat.com>
Signed-off-by: Francisco Javier Arceo <farceo@redhat.com>
Signed-off-by: Francisco Javier Arceo <farceo@redhat.com>
Signed-off-by: Francisco Javier Arceo <farceo@redhat.com>
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