Skip to content

Commit b8ecafc

Browse files
committed
Don't prevent NodeJS from closing to run acquisition timeout error
1 parent 839733b commit b8ecafc

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

Lines changed: 1 addition & 0 deletions
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

Lines changed: 1 addition & 0 deletions
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)