summary refs log tree commit diff
path: root/util/src
diff options
context:
space:
mode:
authorMr2u <46743919+Mr2u@users.noreply.github.com>2021-10-13 19:33:39 +1100
committerGitHub <noreply@github.com>2021-10-13 19:33:39 +1100
commit51274df43a3c8d2486c536b8a3ecdc6926cc0df8 (patch)
tree31dd5b926c70bdf9270f379cd5e2fe45af4a357a /util/src
parentadded route /guilds/:id/prune GET count and POST prune. (diff)
parent:pencil: improve logging (diff)
downloadserver-51274df43a3c8d2486c536b8a3ecdc6926cc0df8.tar.xz
Merge branch 'fosscord:master' into master
Diffstat (limited to 'util/src')
-rw-r--r--util/src/util/Event.ts2
1 files changed, 2 insertions, 0 deletions
diff --git a/util/src/util/Event.ts b/util/src/util/Event.ts

index bf9547b1..8ed009d5 100644 --- a/util/src/util/Event.ts +++ b/util/src/util/Event.ts
@@ -46,7 +46,9 @@ export async function listenEvent(event: string, callback: (event: EventOpts) => } else { const cancel = () => { events.removeListener(event, callback); + events.setMaxListeners(events.getMaxListeners() - 1); }; + events.setMaxListeners(events.getMaxListeners() + 1); events.addListener(event, (opts) => callback({ ...opts, cancel })); return cancel;