Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 0 additions & 6 deletions lib/generic-handlers.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
Loading