Skip to content

Commit

Permalink
fix: action received response on broadcast success
Browse files Browse the repository at this point in the history
  • Loading branch information
Devdutt Shenoi committed Dec 30, 2022
1 parent fb7a4cf commit 8bab9bd
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions uplink/src/collector/tcpjson.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit 8bab9bd

Please sign in to comment.