diff --git a/ipc/nano/src/lib.rs b/ipc/nano/src/lib.rs index 4759217b0..58c2d22de 100644 --- a/ipc/nano/src/lib.rs +++ b/ipc/nano/src/lib.rs @@ -27,8 +27,8 @@ use std::sync::*; use nanomsg::{Socket, Protocol, Error, Endpoint, PollRequest, PollFd, PollInOut}; use std::ops::Deref; -const POLL_TIMEOUT: isize = 100; -const CLIENT_CONNECTION_TIMEOUT: isize = 2500; +const POLL_TIMEOUT: isize = 200; +const CLIENT_CONNECTION_TIMEOUT: isize = 15000; /// Generic worker to handle service (binded) sockets pub struct Worker where S: IpcInterface { @@ -68,7 +68,6 @@ pub fn init_duplex_client(socket_addr: &str) -> Result, Sock SocketError::DuplexLink })); - // 2500 ms default timeout socket.set_receive_timeout(CLIENT_CONNECTION_TIMEOUT).unwrap(); let endpoint = try!(socket.connect(socket_addr).map_err(|e| { @@ -91,7 +90,6 @@ pub fn init_client(socket_addr: &str) -> Result, SocketError SocketError::RequestLink })); - // 2500 ms default timeout socket.set_receive_timeout(CLIENT_CONNECTION_TIMEOUT).unwrap(); let endpoint = try!(socket.connect(socket_addr).map_err(|e| { diff --git a/parity/run.rs b/parity/run.rs index c2b07f487..c659d4d25 100644 --- a/parity/run.rs +++ b/parity/run.rs @@ -80,9 +80,6 @@ pub struct RunCmd { } pub fn execute(cmd: RunCmd) -> Result<(), String> { - // create supervisor - let mut hypervisor = modules::hypervisor(); - // increase max number of open files raise_fd_limit(); @@ -165,6 +162,9 @@ pub fn execute(cmd: RunCmd) -> Result<(), String> { net_conf.boot_nodes = spec.nodes.clone(); } + // create supervisor + let mut hypervisor = modules::hypervisor(); + // create client service. let service = try!(ClientService::start( client_config,