Skip to content

Commit

Permalink
wg-webclient/websocket.rs: ignore BrokenPipe errors since the socket …
Browse files Browse the repository at this point in the history
…should recover on its own. part of #86
  • Loading branch information
ffreddow committed Sep 18, 2024
1 parent 5fcfccb commit 7e04cb5
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions wg-webclient/src/websocket.rs
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,10 @@ where
tungstenite::Error::Io(err) => {
match err.kind() {
std::io::ErrorKind::WouldBlock => (),

// This error happens when updating a firmware and when rebooting the charger.
// The underlying tcp stream should be able to recover
std::io::ErrorKind::BrokenPipe => (),
err => {
log::error!("Error: {err:?}");
}
Expand Down

0 comments on commit 7e04cb5

Please sign in to comment.