Radish alpha
h
Radicle Heartwood Protocol & Stack
Radicle
Git (anonymous pull)
Log in to clone via SSH
node: Add timeouts to daemon connection
Alexis Sellier committed 2 years ago
commit 765823c686caa89db0b76c19595189ac1fde4e8e
parent cb576cf8c33974e8acd59271f84af5aed3b3aded
1 file changed +3 -0
modified 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)?;