mirror of
https://github.com/mikedilger/chorus.git
synced 2026-08-01 07:21:39 +00:00
Swallow mild IO errors inside of Tungstenite errors
This commit is contained in:
parent
10dc423012
commit
e57167dd05
17
src/lib.rs
17
src/lib.rs
@ -189,6 +189,23 @@ async fn handle_http_request(
|
||||
// No big deal, still SessionExit::Ok
|
||||
msg = "Reset";
|
||||
}
|
||||
ChorusError::Tungstenite(tungstenite::error::Error::Io(
|
||||
ref ioerror,
|
||||
)) => {
|
||||
match ioerror.kind() {
|
||||
std::io::ErrorKind::ConnectionReset |
|
||||
std::io::ErrorKind::ConnectionAborted |
|
||||
std::io::ErrorKind::UnexpectedEof => {
|
||||
// no biggie.
|
||||
msg = "Reset";
|
||||
}
|
||||
_ => {
|
||||
log::error!(target: "Client", "{}: {}", peer, e);
|
||||
session_exit = SessionExit::ErrorExit;
|
||||
msg = "Error Exited";
|
||||
}
|
||||
}
|
||||
}
|
||||
ChorusError::ErrorClose => {
|
||||
session_exit = SessionExit::TooManyErrors;
|
||||
msg = "Errored Out";
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user