From 5cd6a0408245c43aa515d894873bf396b3e79a04 Mon Sep 17 00:00:00 2001 From: NikVolf Date: Mon, 4 Apr 2016 00:00:57 +0300 Subject: [PATCH] to pollng also --- ipc/nano/Cargo.toml | 1 + ipc/nano/src/lib.rs | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) 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); + } } } }