Skip to content

Commit 75d3040

Browse files
authored
Don't prevent NodeJS from closing to run acquisition timeout error (#1196)
1 parent 536b1e0 commit 75d3040

File tree

2 files changed

+2
-0
lines changed
  • packages
    • bolt-connection/src/pool
    • neo4j-driver-deno/lib/bolt-connection/pool

2 files changed

+2
-0
lines changed

packages/bolt-connection/src/pool/pool.js

+1
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,7 @@ class Pool {
113113
)
114114
}
115115
}, this._acquisitionTimeout)
116+
typeof timeoutId === 'object' && timeoutId.unref()
116117

117118
request = new PendingRequest(key, acquisitionContext, config, resolve, reject, timeoutId, this._log)
118119
allRequests[key].push(request)

packages/neo4j-driver-deno/lib/bolt-connection/pool/pool.js

+1
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,7 @@ class Pool {
113113
)
114114
}
115115
}, this._acquisitionTimeout)
116+
typeof timeoutId === 'object' && timeoutId.unref()
116117

117118
request = new PendingRequest(key, acquisitionContext, config, resolve, reject, timeoutId, this._log)
118119
allRequests[key].push(request)

0 commit comments

Comments
 (0)