Fix the status of the scanner in case of failure.
If the scan fails. Clean up the pending jobs to return the scanner to idle state #283 (comment 335201231)
If the scan fails. Clean up the pending jobs to return the scanner to idle state #283 (comment 335201231)