diff --git a/ipc/nano/Cargo.toml b/ipc/nano/Cargo.toml index 73de137c3..c13a7b5a5 100644 --- a/ipc/nano/Cargo.toml +++ b/ipc/nano/Cargo.toml @@ -9,3 +9,4 @@ license = "GPL-3.0" [dependencies] "ethcore-ipc" = { path = "../rpc" } nanomsg = "0.5.0" +log = "0.3" diff --git a/ipc/nano/src/lib.rs b/ipc/nano/src/lib.rs index c43cb9b3e..e92542d03 100644 --- a/ipc/nano/src/lib.rs +++ b/ipc/nano/src/lib.rs @@ -18,6 +18,7 @@ extern crate ethcore_ipc as ipc; extern crate nanomsg; +#[macro_use] extern crate log; pub use ipc::*; @@ -47,7 +48,9 @@ impl Worker where S: IpcInterface { let result = self.service.dispatch_buf( self.method_buf[1] as u16 * 256 + self.method_buf[0] as u16, socket); - socket.write(&result); + if let Err(e) = socket.write(&result) { + warn!(target: "ipc", "Failed to write response: {:?}", e); + } } } }