We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent da54e2c commit abe443dCopy full SHA for abe443d
src/messenger.rs
@@ -418,6 +418,10 @@ where
418
cleanup_on_cancel.message_sent();
419
420
let mut response = if let Some(timeout) = self.timeout {
421
+ // If a request times out, return a `RequestError::IO` with a timeout error.
422
+ // This allows the backoff mechanism to detect transport issues and re-establish the connection as needed.
423
+ //
424
+ // Typically, timeouts occur due to abrupt TCP connection loss (e.g., a disconnected cable).
425
tokio::time::timeout(timeout, rx).await.map_err(|_| {
426
RequestError::IO(std::io::Error::new(
427
std::io::ErrorKind::TimedOut,
0 commit comments