Skip to content

Detach client on disconnect in TCP server mode - #12

Merged
wadoon merged 1 commit into
fix/java-rpc-correctnessfrom
fix/server-reconnect
Jun 22, 2026
Merged

Detach client on disconnect in TCP server mode#12
wadoon merged 1 commit into
fix/java-rpc-correctnessfrom
fix/server-reconnect

Conversation

@unp1

@unp1 unp1 commented Jun 22, 2026

Copy link
Copy Markdown
Member

Reconnection robustness (keyext.api):

In TCP server mode runTcpServer keeps the loaded environments/proofs alive across client connections, but after a client disconnected keyApi.clientApi still referenced the now-dead remote proxy until the next client attached. Any notification fired in that window would target a dead connection.

KeyApiImpl.disconnectClient() now resets the client to the no-op sink, and runTcpServer calls it whenever a connection ends, so notifications are safely dropped until a new client attaches via setClientApi.

Test: ClientDisconnectTest verifies the client is detached (and replaced by a non-null no-op) after disconnectClient().

Stacked on #6 (it builds on the no-op client introduced there); retarget to main after #6 merges.

PR has been created with AI tooling

@unp1
unp1 force-pushed the fix/server-reconnect branch from e442675 to c57686b Compare June 22, 2026 18:25
@wadoon
wadoon merged commit 8a5903f into fix/java-rpc-correctness Jun 22, 2026
3 checks 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.

2 participants