Skip to content

fix(websocket): handle no-status server close - #105

Closed
GregHolmes wants to merge 3 commits into
mainfrom
gh/fix-websocket-server-close
Closed

GregHolmes wants to merge 3 commits into
mainfrom
gh/fix-websocket-server-close

Conversation

@GregHolmes

@GregHolmes GregHolmes commented Sep 14, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

  • acknowledge a peer close so OkHttp completes the close handshake and invokes onDisconnected
  • respond to Flux STT's reserved 1005 no-status sentinel with a valid 1000 close instead of throwing
  • suppress reconnect only when the closing Flux Listen v2 socket accepted CloseStream; unrelated, rejected, and later-session no-status closes retain retry behavior
  • add MockWebServer and listener-level regression coverage

ReconnectingWebSocketListener and the Listen v2 client remain frozen because Fern generates them; .fernignore and AGENTS.md record the patches.

Validation

  • ./gradlew spotlessCheck test compileExamples
  • Manual production Flux probe: after CloseStream, received one onDisconnected callback with code=1005 and observed no reconnect.

Closes #103

@GregHolmes

Copy link
Copy Markdown
Collaborator Author

Closing as superseded by #110. Fern 4.19.3 now provides the peer-close acknowledgement, valid no-status close handling, and reconnect hook; #110 retains the Listen V2 CloseStream-specific terminal policy and regression coverage.

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.

[Bug] Handle server-initiated WebSocket closes without reconnecting

1 participant