diff --git a/CHANGELOG.md b/CHANGELOG.md index 654a1645..6d87b96c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,12 @@ All notable changes to this project will be documented in this file. This project adheres to [Semantic Versioning](http://semver.org/). The format is based on [Keep a Changelog](http://keepachangelog.com/). +## Version 3.13.0 + +### Fixed + +- Remove extra function setting status to scanning to avoid race conditions. + ## Version 3.12.1 ### Added diff --git a/lib/generic-handlers.js b/lib/generic-handlers.js index 1860f41d..9b2063f4 100644 --- a/lib/generic-handlers.js +++ b/lib/generic-handlers.js @@ -189,12 +189,6 @@ async function rescan(req, attachmentId) { // No scan or scan expired: trigger scan and reject const malwareScanner = await cds.connect.to("malwareScanner") - // Set status to Scanning and commit before emitting event to prevent race conditions - cds.tx( - async () => await malwareScanner.updateStatus(target, keys, "Scanning"), - ) - - // Trigger scanning in separate transaction as req.reject closes the current transaction cds.spawn(async () => { await malwareScanner.emit("ScanAttachmentsFile", { target,