Skip to content

Commit 50f0c5b

Browse files
committed
Respond with null to unknown comms to avoid RPC timeouts
1 parent 2d22744 commit 50f0c5b

1 file changed

Lines changed: 16 additions & 2 deletions

File tree

ggsql-jupyter/src/kernel.rs

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -648,9 +648,23 @@ impl KernelServer {
648648
self.handle_data_explorer_rpc(method, rpc_id, comm_id, parent, identities)
649649
.await?;
650650
}
651-
// Unknown comm
651+
// Unknown comm — still respond to avoid RPC timeouts
652652
else {
653-
tracing::warn!("Message for unknown comm_id: {}", comm_id);
653+
tracing::warn!("JSON-RPC request for unknown comm_id: {}, method: {}", comm_id, method);
654+
self.send_shell_reply(
655+
"comm_msg",
656+
json!({
657+
"comm_id": comm_id,
658+
"data": {
659+
"jsonrpc": "2.0",
660+
"id": rpc_id,
661+
"result": null
662+
}
663+
}),
664+
parent,
665+
identities,
666+
)
667+
.await?;
654668
}
655669
}
656670

0 commit comments

Comments
 (0)