From 765823c686caa89db0b76c19595189ac1fde4e8e Mon Sep 17 00:00:00 2001 From: Alexis Sellier Date: Fri, 16 Jun 2023 09:42:34 +0200 Subject: [PATCH] node: Add timeouts to daemon connection --- radicle-node/src/worker.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/radicle-node/src/worker.rs b/radicle-node/src/worker.rs index 9d7ac762..8315174f 100644 --- a/radicle-node/src/worker.rs +++ b/radicle-node/src/worker.rs @@ -339,6 +339,9 @@ impl Worker { .map_err(UploadError::DaemonConnectionFailed)?; let (mut daemon_r, mut daemon_w) = (daemon.try_clone()?, daemon); + daemon_r.set_read_timeout(Some(self.timeout))?; + daemon_w.set_write_timeout(Some(self.timeout))?; + // Write the raw request to the daemon, once we've parsed it. daemon_w.write_all(&request)?;