fix(client): report read-timeout restore failures

This commit is contained in:
Nils Andreas Svee committed 2026-05-10 20:56:43 +07:00
1 parent 07d14328d3
commit 33e2b663b8
2 files changed
+3 -1

No files matched your search

+1 -1
View File
@@ -85,7 +85,7 @@ impl Client {
.set_read_timeout(self.config.socket_config.recv_timeout);
match (outcome, restore) {
(Ok(outcome), Ok(())) => Ok(outcome),
(Ok(outcome), Err(_)) => Ok(outcome),
(Ok(_), Err(source)) => Err(ClientError::ReadTimeoutRestore { source }),
(Err(err), Ok(())) => Err(err),
(Err(err), Err(_)) => Err(err),
}
+2
View File
@@ -14,6 +14,8 @@ pub enum ClientError {
remote: std::net::SocketAddr,
source: io::Error,
},
#[error("failed to restore configured socket read timeout after open negotiation: {source}")]
ReadTimeoutRestore { source: io::Error },
#[error("protocol error: {0}")]
Protocol(#[from] irtt_proto::ProtoError),
#[error("all open requests timed out")]