mirror of
https://github.com/pezkuwichain/pezkuwi-telemetry.git
synced 2026-06-11 15:21:10 +00:00
Add a note about closing ws with statuscode+reason
This commit is contained in:
@@ -167,7 +167,9 @@ async fn handle_websocket_connection<S>(websocket: ws::WebSocket, mut tx_to_aggr
|
||||
}
|
||||
}
|
||||
|
||||
// loops ended; attempt to close the connection gracefully:
|
||||
// loops ended; attempt to close the connection gracefully.
|
||||
// Note: IF we want to close with a status code and reason, we need to construct
|
||||
// a ws::Message using `ws::Message::close_with`, rather than using this method:
|
||||
let _ = websocket.close().await;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user