fix: allocating incorrect max value due to missing parentheses (#26)

This commit is contained in:
Charuka Samarakoon 2024-04-19 06:31:23 +05:30 committed by GitHub
parent d4ca381c38
commit d47310a6f7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -74,7 +74,7 @@ export class PuppeteerControl extends AsyncService {
return page.browser().connected && !page.isClosed();
}
}, {
max: Math.max(1 + Math.floor(os.freemem() / 1024 * 1024 * 1024), 16),
max: Math.max(1 + Math.floor(os.freemem() / (1024 * 1024 * 1024)), 16),
min: 1,
acquireTimeoutMillis: 60_000,
testOnBorrow: true,