mirror of
https://github.com/brianc/node-postgres.git
synced 2026-01-18 15:55:05 +00:00
Only call client.ref if it exists. Fixes #2582
This commit is contained in:
parent
f3b0ee4c09
commit
74babd3c59
@ -137,7 +137,7 @@ class Pool extends EventEmitter {
|
||||
const idleItem = this._idle.pop()
|
||||
clearTimeout(idleItem.timeoutId)
|
||||
const client = idleItem.client
|
||||
client.ref()
|
||||
client.ref && client.ref()
|
||||
const idleListener = idleItem.idleListener
|
||||
|
||||
return this._acquireClient(client, pendingItem, idleListener, false)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user