Skip to content

Commit

Permalink
Identify "failed to read status" as ErrorKind::Connection errors
Browse files Browse the repository at this point in the history
So that they will be handled by the retry_request_batch() automatic
retry mechanism, which only applies to connection-related errors.
  • Loading branch information
shesek committed May 14, 2024
1 parent 4de3c79 commit bc09e86
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/daemon.rs
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ impl Connection {
.chain_err(|| {
ErrorKind::Connection("disconnected from daemon while receiving".to_owned())
})?
.chain_err(|| "failed to read status")?;
.chain_err(|| ErrorKind::Connection("failed to read status".to_owned()))?;
let mut headers = HashMap::new();
for line in iter {
let line = line.chain_err(|| ErrorKind::Connection("failed to read".to_owned()))?;
Expand Down

0 comments on commit bc09e86

Please sign in to comment.