Skip to content

Commit

Permalink
debug connection closed
Browse files Browse the repository at this point in the history
  • Loading branch information
borngraced committed Nov 12, 2024
1 parent d643b29 commit 4a78c4b
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions relay_client/src/websocket/connection.rs
Original file line number Diff line number Diff line change
Expand Up @@ -81,14 +81,15 @@ pub async fn connection_event_loop<T>(
}

StreamEvent::InboundError(error) => {
println!("err: {error:?}");
if let ClientError::WebsocketClient(WebsocketClientError::Transport(err)) = &error {
if err.to_string().contains("Operation timed out") {
let err_str = err.to_string();
if err_str.contains("Operation timed out") || err_str.contains("unexpected end of file") {
handler.disconnected(None);
conn.reset();
};

if err.to_string().contains("unexpected end of file") {
conn.reset();
}
println!("done resetting");
}
handler.inbound_error(error);
}
Expand Down

0 comments on commit 4a78c4b

Please sign in to comment.