Skip to content

Commit

Permalink
Merge pull request #3046 from Bravo555/fix/operation-handler-needless…
Browse files Browse the repository at this point in the history
…-spawn

fix: stop OperationHandler spawning extra tasks
  • Loading branch information
reubenmiller committed Aug 1, 2024
2 parents 0d7594c + be3b850 commit 28a6221
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion crates/extensions/c8y_mapper_ext/src/operations/handler.rs
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ impl OperationHandler {
let running_operation = self.running_operations.remove(&topic);

let running_operation =
running_operation.unwrap_or(RunningOperation::spawn(Arc::clone(&self.context)));
running_operation.unwrap_or_else(|| RunningOperation::spawn(Arc::clone(&self.context)));

let operation_status = running_operation
.update(message)
Expand Down

0 comments on commit 28a6221

Please sign in to comment.