File tree Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -23,6 +23,11 @@ Thin Mode Changes
23
23
unless the number of batch errors is a multiple of 65536; instead,
24
24
the number of batch errors returned is modulo 65536.
25
25
26
+ #) Updated pool functionality to scan and remove idle connections from
27
+ beginning of free connection list. This will ensure removal of all idle
28
+ connections present in free connection list.
29
+ `Issue #1633 <https://github.com/oracle/node-oracledb/issues/1633 >`__.
30
+
26
31
Thick Mode Changes
27
32
++++++++++++++++++
28
33
Original file line number Diff line number Diff line change @@ -363,13 +363,13 @@ class ThinPoolImpl extends PoolImpl {
363
363
_scanIdleConnection ( ) {
364
364
while ( ( this . _usedConnectionList . size + this . _freeConnectionList . length ) >
365
365
this . _poolMin && this . _freeConnectionList . length > 0 ) {
366
- const conn = this . _freeConnectionList [ this . _freeConnectionList . length - 1 ] ;
366
+ const conn = this . _freeConnectionList [ 0 ] ;
367
367
if ( Date . now ( ) - conn . _lastTimeUsed < this . _poolTimeout * 1000 ) {
368
368
break ;
369
369
}
370
370
371
371
this . eventEmitter . emit ( '_removePoolConnection' , conn ) ;
372
- this . _freeConnectionList . pop ( ) ;
372
+ this . _freeConnectionList . shift ( ) ;
373
373
}
374
374
375
375
this . _schedulerJob = null ;
You can’t perform that action at this time.
0 commit comments