Summary
A server-initiated WebSocket close does not reliably notify onDisconnected, and non-1000 closes are treated as reconnectable. Flux STT closes after CloseStream with no status (observed as 1005), so applications that wait for the server close can hang or reconnect instead of terminating.
Affected version
0.10.0
Evidence
src/main/java/com/deepgram/core/ReconnectingWebSocketListener.java implements onClosed(...) but not onClosing(...); it calls scheduleReconnect() for every code other than 1000. The class is Fern-generated but temporarily frozen for existing reconnect fixes.
Expected behavior
A server close should result in one onDisconnected callback and should not reconnect when the protocol session has ended.
Acceptance criteria
- Server-initiated close reaches the public
onDisconnected handler without an explicit client disconnect().
- A no-status/1005 close after Flux
CloseStream does not reconnect.
- Reconnect behavior remains available for actual transport failures.
- Add a MockWebServer regression test.
- Preserve the
.fernignore freeze and report the generator gap upstream.
Summary
A server-initiated WebSocket close does not reliably notify
onDisconnected, and non-1000 closes are treated as reconnectable. Flux STT closes afterCloseStreamwith no status (observed as 1005), so applications that wait for the server close can hang or reconnect instead of terminating.Affected version
0.10.0Evidence
src/main/java/com/deepgram/core/ReconnectingWebSocketListener.javaimplementsonClosed(...)but notonClosing(...); it callsscheduleReconnect()for every code other than 1000. The class is Fern-generated but temporarily frozen for existing reconnect fixes.Expected behavior
A server close should result in one
onDisconnectedcallback and should not reconnect when the protocol session has ended.Acceptance criteria
onDisconnectedhandler without an explicit clientdisconnect().CloseStreamdoes not reconnect..fernignorefreeze and report the generator gap upstream.