aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/daemon.rs10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/daemon.rs b/src/daemon.rs
index 3270c1b..8300def 100644
--- a/src/daemon.rs
+++ b/src/daemon.rs
@@ -270,8 +270,14 @@ fn handle_client(
stream: std::os::unix::net::UnixStream,
tx: &mpsc::Sender<DaemonRequest>,
) -> Result<(), Box<dyn std::error::Error>> {
- stream.set_nonblocking(false)?;
- stream.set_read_timeout(Some(Duration::from_secs(60)))?;
+ if let Err(e) = stream.set_nonblocking(false) {
+ log::warn!("unix: failed to set blocking mode: {e}");
+ return Err(e.into());
+ }
+ if let Err(e) = stream.set_read_timeout(Some(Duration::from_secs(60))) {
+ log::warn!("unix: failed to set read timeout: {e}");
+ return Err(e.into());
+ }
let mut reader = BufReader::new(&stream);
let mut writer = &stream;