Skip to content

Commit

Permalink
Error: Rename 'PingTimeout' to 'ConnectionTimeout'
Browse files Browse the repository at this point in the history
  • Loading branch information
pawelkn committed Feb 3, 2024
1 parent a9fdb4c commit 1188aa0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/connection.rs
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ impl Connection {
loop {
let result = match timeout(PING_INTERVAL * 3, read.next()).await {
Ok(result) => result,
Err(_) => return Err(Error::PingTimeout),
Err(_) => return Err(Error::ConnectionTimeout),
};

let message = match result {
Expand Down
4 changes: 2 additions & 2 deletions src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ use thiserror::Error;
pub enum Error {
#[error("Connection closed")]
ConnectionClosed,
#[error("Ping timeout")]
PingTimeout,
#[error("Connection timeout")]
ConnectionTimeout,
#[error("No data received")]
NoDataReceived,
#[error("Trading is disabled when safe=true")]
Expand Down

0 comments on commit 1188aa0

Please sign in to comment.