Merge pull request #3418 from gradido/fix_workerthread

fix(backend): toggle for using worker threads for password encryption
This commit is contained in:
einhornimmond 2025-01-18 18:48:14 +01:00 committed by GitHub
commit d14259c2ef
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 2 deletions

View File

@ -46,7 +46,7 @@ export const SecretKeyCryptographyCreateKey = (
return encryptionKeyHash.readBigUInt64LE()
}
if (CONFIG.USE_CRYPTO_WORKER) {
if (CONFIG.USE_CRYPTO_WORKER === true && typeof process.send === 'function') {
worker({
SecretKeyCryptographyCreateKey,
})

View File

@ -23,7 +23,7 @@ const configLoginServerKey = Buffer.from(CONFIG.LOGIN_SERVER_KEY, 'hex')
let encryptionWorkerPool: Pool | undefined
if (CONFIG.USE_CRYPTO_WORKER) {
if (CONFIG.USE_CRYPTO_WORKER === true) {
encryptionWorkerPool = pool(
path.join(__dirname, '..', '..', 'build', 'src', 'password', '/EncryptionWorker.js'),
{