core: Fix noisy logs caused by closing the /feed browser (#496)

Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>

Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
This commit is contained in:
Alexandru Vasile
2022-08-29 16:20:35 +03:00
committed by GitHub
parent fc460d74d3
commit d525056190
+11 -4
View File
@@ -464,23 +464,30 @@ where
.await
{
Err(_) => {
log::warn!("Closing feed websocket that was too slow to keep up (too slow to send messages)");
log::debug!("Closing feed websocket that was too slow to keep up (too slow to send messages)");
break 'outer;
}
Ok(Err(soketto::connection::Error::Closed)) => {
break 'outer;
}
Ok(Err(e)) => {
log::warn!("Closing feed websocket due to error sending data: {}", e);
log::debug!("Closing feed websocket due to error sending data: {}", e);
break 'outer;
}
Ok(_) => {}
}
}
match tokio::time::timeout_at(message_send_deadline, ws_send.flush()).await {
Err(_) => {
log::warn!("Closing feed websocket that was too slow to keep up (too slow to flush messages)");
log::debug!("Closing feed websocket that was too slow to keep up (too slow to flush messages)");
break;
}
Ok(Err(soketto::connection::Error::Closed)) => {
break;
}
Ok(Err(e)) => {
log::warn!("Closing feed websocket due to error flushing data: {}", e);
log::debug!("Closing feed websocket due to error flushing data: {}", e);
break;
}
Ok(_) => {}