reorder relay activities to avoid delivery race condition
This commit is contained in:
parent
d39a56c1b7
commit
c302a5c2d7
11 changed files with 40 additions and 44 deletions
|
|
@ -5,6 +5,10 @@
|
|||
|
||||
const promiseRefs: Set<WeakRef<Promise<unknown>>> = new Set();
|
||||
|
||||
export function trackTask(task: () => Promise<unknown>): void {
|
||||
trackPromise(task());
|
||||
}
|
||||
|
||||
/**
|
||||
* This tracks promises that other modules decided not to wait for,
|
||||
* and makes sure they are all settled before fully closing down the server.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue