-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cleanup leftover panics, downgrade errors to warnings where appropriate #70
Conversation
@@ -276,7 +276,8 @@ pub async fn connect<E: ClientExt + 'static>( | |||
tracing::info!("connecting to {}...", config.url); | |||
let (stream, _) = tokio_tungstenite::connect_async(http_request).await?; | |||
if let Err(err) = client.on_connect().await { | |||
tracing::error!("calling `connected()` failed due to {}", err); | |||
tracing::warn!("calling `connected()` failed due to {}", err); | |||
return Err(err); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Now close the client if on_connect()
returns an error, to be consistent with other client extension methods.
@gbaranski can you review this one? |
b4da1f2
to
1309dca
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I left a comment about the future work.
Except of that, it looks good to me :)
@@ -264,7 +264,7 @@ where | |||
let timestamp = Duration::from_millis(timestamp as u64); // TODO: handle overflow |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should handle it somehow when the timestamp isn't there.
1309dca
to
795223e
Compare
795223e
to
0d861ff
Compare
Problem
Solution