Skip to content

Commit

Permalink
Fix: set status to Stopped if the scan was successfully stopped (#1587)
Browse files Browse the repository at this point in the history
  • Loading branch information
jjnicola authored Mar 11, 2024
1 parent 17068be commit cef0e8f
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions rust/openvasd/src/scheduling.rs
Original file line number Diff line number Diff line change
Expand Up @@ -296,6 +296,9 @@ where
if let Some(idx) = running.iter().position(|x| x == &cid) {
running.swap_remove(idx);
}
let mut current_status = self.db.get_status(&cid).await?;
current_status.status = Phase::Stopped;
self.db.update_status(&cid, current_status).await?;
Ok(())
}
Err(e) => Err(e),
Expand Down

0 comments on commit cef0e8f

Please sign in to comment.