diff --git a/src/indexer.rs b/src/indexer.rs index 2675c22..337a9f5 100644 --- a/src/indexer.rs +++ b/src/indexer.rs @@ -433,12 +433,10 @@ async fn host_subscription(server: Arc, 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; } }