From fdec1ccbb06ecee15f49dbc61c5eea3441ca7cbb Mon Sep 17 00:00:00 2001 From: einhornimmond Date: Wed, 15 Jan 2025 20:11:31 +0100 Subject: [PATCH] make sure that worker is only called in child process, even if EncryptionWorker.ts was imported by main thread to make sure it was builded --- backend/src/password/EncryptionWorker.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/src/password/EncryptionWorker.ts b/backend/src/password/EncryptionWorker.ts index 5a223bee1..36c08f1b6 100644 --- a/backend/src/password/EncryptionWorker.ts +++ b/backend/src/password/EncryptionWorker.ts @@ -46,7 +46,7 @@ export const SecretKeyCryptographyCreateKey = ( return encryptionKeyHash.readBigUInt64LE() } -if (CONFIG.USE_CRYPTO_WORKER === true) { +if (CONFIG.USE_CRYPTO_WORKER === true && typeof process.send === 'function') { worker({ SecretKeyCryptographyCreateKey, })