From b8c2f2a647274869ef51a6ea576e6de8b2e4523a Mon Sep 17 00:00:00 2001 From: Alexis Sellier Date: Tue, 23 May 2023 14:22:07 +0200 Subject: [PATCH] node: Rename `InvalidPacketLine` error variant In case of timeout on reading the packet-line, we would get this error. It would be confusing, as the packet-line wasn't invalid, just never received. --- radicle-node/src/worker.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/radicle-node/src/worker.rs b/radicle-node/src/worker.rs index 863eb2a2..9d7ac762 100644 --- a/radicle-node/src/worker.rs +++ b/radicle-node/src/worker.rs @@ -66,7 +66,7 @@ pub enum UploadError { #[error("worker failed to connect to git daemon: {0}")] DaemonConnectionFailed(io::Error), #[error("error parsing git command packet-line: {0}")] - InvalidPacketLine(io::Error), + PacketLine(io::Error), #[error(transparent)] Io(#[from] io::Error), } @@ -308,7 +308,7 @@ impl Worker { return Ok(ControlFlow::Break(())); } Err(err) => { - return Err(UploadError::InvalidPacketLine(err)); + return Err(UploadError::PacketLine(err)); } }; log::debug!(target: "worker", "Received Git request pktline for {rid}..");