Skip to content

Commit 044f23d

Browse files
committed
client-api: Don't debug-print dropped outgoing Ws messages at info
It's not impossible for a client to disconnect while there are outstanding subscription messages (e.g. `st_client` updates), and printing them all to the log at info level just creates a lot of data with limited value. Print them at debug level instead.
1 parent 1c65d7b commit 044f23d

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

crates/client-api/src/routes/subscribe.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -296,7 +296,8 @@ async fn ws_client_actor_inner(
296296
// TODO: this isn't great. when we receive a close request from the peer,
297297
// tungstenite doesn't let us send any new messages on the socket,
298298
// even though the websocket RFC allows it. should we fork tungstenite?
299-
log::info!("dropping messages due to ws already being closed: {:?}", &rx_buf[..n]);
299+
log::info!("dropping {n} messages due to ws already being closed");
300+
log::debug!("dropped messages: {:?}", &rx_buf[..n]);
300301
} else {
301302
let send_all = async {
302303
for msg in rx_buf.drain(..n) {

0 commit comments

Comments
 (0)