diff --git a/filegateway/session_pool.js b/filegateway/session_pool.js index 678b69e..e237b38 100644 --- a/filegateway/session_pool.js +++ b/filegateway/session_pool.js @@ -55,13 +55,13 @@ class SessionPool { /** * Cleans up expired sessions from the pool. */ - cleanupSessions() { + async cleanupSessions() { const now = Date.now(); for (const [key, session] of this.sessions) { if (session.expiration <= now) { this.sessions.delete(key); - session.off(session.value) + await session.off(session.value) } } }