Fixed lock is not released
MODIFY
src/server/rest/v1/service/TagService.ts
src/server/rest/v1/service/TagService.ts
@@ -504,8 +504,11 @@ export default class TagService {
req.pipe(busboy);
// Handle closed socket
let connectionClosed = false;
- req.socket.on('close', () => {
+ // eslint-disable-next-line @typescript-eslint/no-misused-promises
+ req.socket.on('close', async () => {
connectionClosed = true;
+ // Release the lock
+ await LockingManager.release(importTagsLock);
});
// eslint-disable-next-line @typescript-eslint/no-misused-promises
busboy.on('file', async (fieldname: string, file: any, filename: string, encoding: string, mimetype: string) => {

MODIFY
src/server/rest/v1/service/UserService.ts
src/server/rest/v1/service/UserService.ts
@@ -903,8 +903,11 @@ export default class UserService {
req.pipe(busboy);
// Handle closed socket
let connectionClosed = false;
- req.socket.on('close', () => {
+ // eslint-disable-next-line @typescript-eslint/no-misused-promises
+ req.socket.on('close', async () => {
connectionClosed = true;
+ // Release the lock
+ await LockingManager.release(importUsersLock);
});
// eslint-disable-next-line @typescript-eslint/no-misused-promises
busboy.on('file', async (fieldname, file, filename, encoding, mimetype) => {

Fixed lock is not released