to pollng also

This commit is contained in:
NikVolf 2016-04-04 00:00:57 +03:00
parent 326855dc3a
commit 5cd6a04082
2 changed files with 5 additions and 1 deletions

View File

@ -9,3 +9,4 @@ license = "GPL-3.0"
[dependencies]
"ethcore-ipc" = { path = "../rpc" }
nanomsg = "0.5.0"
log = "0.3"

View File

@ -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<S> Worker<S> where S: IpcInterface<S> {
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);
}
}
}
}