fix(socket): Prevent crashes from timeouts and fix memory leak (#1627)
This commit is contained in:
committed by
GitHub
parent
d878f01efb
commit
0fbce52fd3
@@ -5,6 +5,11 @@ interface QueueJob<T> {
|
||||
}
|
||||
|
||||
const _queueAsyncBuckets = new Map<string | number, Array<QueueJob<any>>>()
|
||||
|
||||
export function cleanupQueues() {
|
||||
_queueAsyncBuckets.clear()
|
||||
}
|
||||
|
||||
const _gcLimit = 10000
|
||||
|
||||
async function _asyncQueueExecutor(queue: Array<QueueJob<any>>, cleanup: () => void): Promise<void> {
|
||||
|
||||
Reference in New Issue
Block a user