We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 897e160 commit 76ab5e1Copy full SHA for 76ab5e1
server/src/api_server/mod.rs
@@ -215,6 +215,10 @@ async fn handle_ws_session(
215
_ = sleep(Duration::from_millis(100)) => {
216
if server.terminate_flag.load(Relaxed) {
217
tracing::debug!("Termination flag set. Closing session.");
218
+ // Send WebSocket close frame for proper close handshake
219
+ if let Err(e) = ws_tx.send(Message::close()).await {
220
+ tracing::debug!(details=%e, "Failed to send close frame (client likely disconnected).");
221
+ }
222
break;
223
}},
224
0 commit comments