summaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorJustus Winter <justus@sequoia-pgp.org>2018-01-18 12:45:51 +0100
committerJustus Winter <justus@sequoia-pgp.org>2018-01-18 12:47:51 +0100
commit52a5631479d120ea55b96e058b0d7587124943e4 (patch)
treecebc00ac56ebf4da56a3b552b6008fb651ad9923 /net
parent6b3408662c9d3a4c27c6883f7bd1f88e60981094 (diff)
net: Improve error reporting.
- Error handling when starting either server or process is tricky. This patch at least displays errors when spawning a thread like we do when spawning a process.
Diffstat (limited to 'net')
-rw-r--r--net/src/ipc.rs7
1 files changed, 6 insertions, 1 deletions
diff --git a/net/src/ipc.rs b/net/src/ipc.rs
index 7bbb529e..c88c2666 100644
--- a/net/src/ipc.rs
+++ b/net/src/ipc.rs
@@ -198,7 +198,12 @@ impl Descriptor {
fn spawn(&self, l: TcpListener) -> io::Result<()> {
let descriptor = self.clone();
- thread::spawn(move || Server::new(descriptor)?.serve_listener(l));
+ thread::spawn(move || -> io::Result<()> {
+ Ok(Server::new(descriptor)
+ .expect("Failed to spawn server") // XXX
+ .serve_listener(l)
+ .expect("Failed to spawn server")) // XXX
+ });
Ok(())
}
}