Skip to content

Commit

Permalink
fix: exit on websocket error
Browse files Browse the repository at this point in the history
If the websocket connection to the Binance API fails, the service should
fail, which will trigger a service restart. Otherwise, the bot gets
stuck. Refs #13.
  • Loading branch information
conorsch committed Jun 29, 2023
1 parent 2ad3918 commit c69570b
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/binance_fetcher.rs
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ impl BinanceFetcher {
match e {
err => {
tracing::error!(?err, "error in web socket event loop");
anyhow::bail!(format!("Failed in web socket loop, exiting"));
}
}
}
Expand Down

0 comments on commit c69570b

Please sign in to comment.