From b83a72a4cead0c488586fb50ecea1c5c7b5a3fe8 Mon Sep 17 00:00:00 2001 From: Adam Wright Date: Tue, 26 Jan 2016 20:42:18 -0800 Subject: [PATCH] Some logs to help with debugging --- tarpc/src/protocol.rs | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/tarpc/src/protocol.rs b/tarpc/src/protocol.rs index f985913..bba02b9 100644 --- a/tarpc/src/protocol.rs +++ b/tarpc/src/protocol.rs @@ -164,9 +164,6 @@ impl<'a, S> ConnectionHandler<'a, S> where S: Serve { Err(bincode::serde::DeserializeError::IoError(ref err)) if Self::timed_out(err.kind()) => { if !shutdown.load(Ordering::SeqCst) { - info!("ConnectionHandler: read timed out ({:?}). Server not \ - shutdown, so retrying read.", - err); continue; } else { info!("ConnectionHandler: read timed out ({:?}). Server shutdown, so \ @@ -460,10 +457,15 @@ impl Client err); try!(self.requests.lock().unwrap().remove_tx(id)); } + debug!("finishing rpc({:?})", request); drop(state); + debug!("recv"); match rx.recv() { Ok(msg) => Ok(msg), - Err(_) => Err(self.requests.lock().unwrap().get_error()), + Err(_) => { + debug!("locking requests map"); + let r = Err(self.requests.lock().unwrap().get_error()); + } } } }