dont log EOF => reconnects

This commit is contained in:
Charlotte Som 2024-11-27 18:49:28 +02:00
parent 06f4ebf47f
commit f5e236fcf9

View file

@ -433,12 +433,10 @@ async fn host_subscription(server: Arc<RelayServer>, host: String) -> Result<()>
tracing::warn!("unexpected frame type {:?}", frame.opcode);
}
Err(e) => {
tracing::error!("{e:?}");
// TODO: should we try to reconnect in every situation?
if let WebSocketError::UnexpectedEOF = e {
tracing::debug!("got unexpected EOF. reconnecting immediately");
if let WebSocketError::UnexpectedEOF = &e {
continue 'reconnect;
} else {
tracing::error!("{e:?}");
break 'reconnect;
}
}