Skip to content

Commit

Permalink
fix small session leak
Browse files Browse the repository at this point in the history
  • Loading branch information
mafintosh committed Aug 8, 2024
1 parent b4a354b commit 71f5b8c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/core-pool.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ module.exports = class CorePool {

linger (core) {
const hex = b4a.toString(core.key, 'hex')
const session = core.session()

if (this.pool.has(hex)) return

const session = core.session()

const wrap = {
session,
timeout: setTimeout(ontimeout, LINGER_TIME, this, session)
Expand Down

0 comments on commit 71f5b8c

Please sign in to comment.