diff --git a/src/robot/robot_manager.rs b/src/robot/robot_manager.rs index f72b893..2709799 100644 --- a/src/robot/robot_manager.rs +++ b/src/robot/robot_manager.rs @@ -92,7 +92,20 @@ impl RobotManager { return Err(Error::ConnectionClosed(*id)); } - let resp = recv_raas_msg(&mut connector.stream).await?; + let ret = recv_raas_msg(&mut connector.stream).await; + + let resp = match ret { + Ok(r) => r, + Err(err) => { + error!( + "Got '{}' receiving message to Robot Connector id={}, closing connection", + err, id + ); + + return Err(Error::ConnectionClosed(*id)); + } + }; + info!("Got response from id={}", id); self.send_resp(resp).await?; } else {