From 672b785b9fae1ac5529d34010d662b7163f547b8 Mon Sep 17 00:00:00 2001 From: Nadav Ivgi Date: Tue, 14 May 2024 22:48:57 +0300 Subject: [PATCH] Identify "failed to read status" as ErrorKind::Connection errors So that they will be handled by the retry_request_batch() automatic retry mechanism, which only applies to connection-related errors. --- src/daemon.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/daemon.rs b/src/daemon.rs index 1b9bb48b2..457bf4230 100644 --- a/src/daemon.rs +++ b/src/daemon.rs @@ -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()))?;