fix promise tracker not working in production
This commit is contained in:
parent
86ca3921c9
commit
e75558735b
1 changed files with 0 additions and 3 deletions
|
|
@ -14,9 +14,6 @@ export function trackTask(task: () => Promise<unknown>): void {
|
|||
* and makes sure they are all settled before fully closing down the server.
|
||||
*/
|
||||
export function trackPromise(promise: Promise<unknown>) {
|
||||
if (process.env.NODE_ENV !== 'test') {
|
||||
return;
|
||||
}
|
||||
const ref = new WeakRef(promise);
|
||||
promiseRefs.add(ref);
|
||||
promise.finally(() => promiseRefs.delete(ref));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue