We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 88311c1 commit 1876f20Copy full SHA for 1876f20
packages/pg-pool/index.js
@@ -205,6 +205,10 @@ class Pool extends EventEmitter {
205
response.callback(new Error('timeout exceeded when trying to connect'))
206
}, this.options.connectionTimeoutMillis)
207
208
+ if (tid.unref) {
209
+ tid.unref()
210
+ }
211
+
212
this._pendingQueue.push(pendingItem)
213
return result
214
}
packages/pg/lib/client.js
@@ -104,6 +104,10 @@ class Client extends EventEmitter {
104
con._ending = true
105
con.stream.destroy(new Error('timeout expired'))
106
}, this._connectionTimeoutMillis)
107
108
+ if (this.connectionTimeoutHandle.unref) {
109
+ this.connectionTimeoutHandle.unref()
110
111
112
113
if (this.host && this.host.indexOf('/') === 0) {
0 commit comments