aboutsummaryrefslogtreecommitdiffstats
path: root/src/bin/rbw-agent/agent.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/bin/rbw-agent/agent.rs')
-rw-r--r--src/bin/rbw-agent/agent.rs9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/bin/rbw-agent/agent.rs b/src/bin/rbw-agent/agent.rs
index e80e1c6..9021569 100644
--- a/src/bin/rbw-agent/agent.rs
+++ b/src/bin/rbw-agent/agent.rs
@@ -118,6 +118,15 @@ async fn handle_request(
.recv()
.await
.context("failed to receive incoming message")?;
+ let req = match req {
+ Ok(msg) => msg,
+ Err(error) => {
+ sock.send(&rbw::protocol::Response::Error { error })
+ .await
+ .context("failed to send response")?;
+ return Ok(());
+ }
+ };
let set_timeout = match &req.action {
rbw::protocol::Action::Login => {
crate::actions::login(sock, state.clone(), req.tty.as_deref())