You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
hyper = { version = "1.6.0", features = ["server", "http1"] }
When a peer resets the connection, error is hyper::Error(Io, Os { code: 104, kind: ConnectionReset, message: "Connection reset by peer" }). I suppose that error in the code above may be also an error returned by my implementation of the hyper::body::Body trait. I would like to distinguish body errors and when a peer resets a connection to log these error with different log levels.
However, all is_* methods of hyper::Error return false. Shouldn't one of the below methods
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
“Cargo.toml”:
When a peer resets the connection,
error
ishyper::Error(Io, Os { code: 104, kind: ConnectionReset, message: "Connection reset by peer" })
. I suppose thaterror
in the code above may be also an error returned by my implementation of thehyper::body::Body
trait. I would like to distinguish body errors and when a peer resets a connection to log these error with different log levels.However, all
is_*
methods ofhyper::Error
returnfalse
. Shouldn't one of the below methodsis_body_write_aborted
is_canceled
is_closed
return
true
?Beta Was this translation helpful? Give feedback.
All reactions