Start timer to IDLE_COOLDOWN before idleEventPromise completes. (#649)

This commit is contained in:
Marc-Andre Ferland 2022-12-12 00:42:11 -05:00 committed by GitHub
parent 8faf6b9f52
commit 9947c3bcfb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1107,7 +1107,7 @@
}
// Calling idle could result in task being added to queue.
if (task_queue.size <= 0 && concurrent_generators.size <= 0) {
return idleEventPromise.then(() => asyncDelay(IDLE_COOLDOWN))
return asyncDelay(IDLE_COOLDOWN).then(() => idleEventPromise)
}
}
if (task_queue.size < serverCapacity) {