From 8bab9bdd4f85f52ed265cb1e21f548eef2c79708 Mon Sep 17 00:00:00 2001 From: Devdutt Shenoi Date: Fri, 30 Dec 2022 17:45:31 +0530 Subject: [PATCH] fix: action received response on broadcast success --- uplink/src/collector/tcpjson.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/uplink/src/collector/tcpjson.rs b/uplink/src/collector/tcpjson.rs index 754d4b0b..54fcdca9 100644 --- a/uplink/src/collector/tcpjson.rs +++ b/uplink/src/collector/tcpjson.rs @@ -104,15 +104,14 @@ impl Bridge { let action = action?; let action_id = action.action_id.clone(); - info!("Received action: {:?}", action); - self.action_status.fill(ActionResponse::progress(&action.action_id, "Received", 0)).await?; - current_action_ = Some(CurrentAction { id: action_id.clone(), timeout: Box::pin(time::sleep(ACTION_TIMEOUT)), }); if self.actions_tx.send(action).is_ok() { + info!("Received action: {:?}", action_id); + self.action_status.fill(ActionResponse::progress(&action_id, "Received", 0)).await?; continue; }