From 4cd24a8f9c3429262f75df138f6151ebf9ede4f6 Mon Sep 17 00:00:00 2001 From: Luis Cruz Date: Wed, 11 Dec 2024 14:53:20 +0000 Subject: [PATCH] teliod: Stop quitting daemon if invalid command received --- clis/teliod/src/command_listener.rs | 1 - clis/teliod/src/daemon.rs | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/clis/teliod/src/command_listener.rs b/clis/teliod/src/command_listener.rs index a27277ec0..c777063ab 100644 --- a/clis/teliod/src/command_listener.rs +++ b/clis/teliod/src/command_listener.rs @@ -88,7 +88,6 @@ impl CommandListener { connection.respond(response.serialize()).await?; Ok(command) } else { - error!("Received invalid command from client: {}", command_str); connection .respond( CommandResponse::Err(format!("Invalid command: {}", command_str)).serialize(), diff --git a/clis/teliod/src/daemon.rs b/clis/teliod/src/daemon.rs index 23dbb7200..7cda85914 100644 --- a/clis/teliod/src/daemon.rs +++ b/clis/teliod/src/daemon.rs @@ -256,7 +256,7 @@ pub async fn daemon_event_loop(config: TeliodDaemonConfig) -> Result<(), TeliodE info!("Client command {:?} executed successfully", command); } Err(err) => { - break Err(err); + error!("Received invalid command from client: {}", err); } } },