Fixed queueTimeout of 0 (Issue #1338)

This commit is contained in:
Christopher Jones 2021-04-13 13:32:11 +10:00
parent 53c25af87b
commit 8cbd79f3d0
2 changed files with 5 additions and 1 deletions

View File

@ -14,6 +14,10 @@
- Fixed use of `oracledb.NCLOB` in `fetchAsString`. See [Issue 1351](https://github.com/oracle/node-oracledb/issues/1351). - Fixed use of `oracledb.NCLOB` in `fetchAsString`. See [Issue 1351](https://github.com/oracle/node-oracledb/issues/1351).
- Fixed `queueTimeout` of 0 to allow pool connection requests to be queued
indefinitely. See [Issue
1338](https://github.com/oracle/node-oracledb/issues/1338).
- Enhanced the numeric suffix feature (for duplicate SELECT column names when - Enhanced the numeric suffix feature (for duplicate SELECT column names when
using `oracledb.OUT_FORMAT_OBJECT` mode) to also support nested cursors and using `oracledb.OUT_FORMAT_OBJECT` mode) to also support nested cursors and
REF CURSORS. REF CURSORS.

View File

@ -118,7 +118,7 @@ async function getConnection(a1) {
// if using a queue timeout, establish the timeout so that when it // if using a queue timeout, establish the timeout so that when it
// expires the payload will be removed from the queue and an exception // expires the payload will be removed from the queue and an exception
// thrown // thrown
if (this._queueTimeout !== 0) { if (this.queueTimeout !== 0) {
payload.timeoutHandle = setTimeout(() => { payload.timeoutHandle = setTimeout(() => {
const ix = this._connRequestQueue.indexOf(payload); const ix = this._connRequestQueue.indexOf(payload);
if (ix >= 0) { if (ix >= 0) {