From 1c1d7d1e0e70009e3041ea136e2e32d4d16cf9bc Mon Sep 17 00:00:00 2001 From: Michael Vines Date: Thu, 28 Jun 2018 15:23:53 -0700 Subject: [PATCH] Log get_last_id errors --- src/thin_client.rs | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/src/thin_client.rs b/src/thin_client.rs index 51dc3bcb15..f0a3da38d8 100644 --- a/src/thin_client.rs +++ b/src/thin_client.rs @@ -150,11 +150,16 @@ impl ThinClient { .send_to(&data, &self.requests_addr) .expect("buffer error in pub fn get_last_id"); - if let Ok(resp) = self.recv_response() { - if let &Response::LastId { .. } = &resp { - done = true; + match self.recv_response() { + Ok(resp) => { + if let &Response::LastId { .. } = &resp { + done = true; + } + self.process_response(resp); + } + Err(e) => { + debug!("thin_client get_last_id error: {}", e); } - self.process_response(resp); } } self.last_id.expect("some last_id")