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 29, 2024
1 parent d1941b9 commit 672b785
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 @@ -208,7 +208,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 672b785

Please sign in to comment.