File tree Expand file tree Collapse file tree 2 files changed +5
-15
lines changed Expand file tree Collapse file tree 2 files changed +5
-15
lines changed Original file line number Diff line number Diff line change @@ -121,7 +121,7 @@ class BasePool extends EventEmitter {
121121 }
122122 for ( let i = 0 ; i < this . _allConnections . length ; i ++ ) {
123123 connection = this . _allConnections . get ( i ) ;
124- connection . _realEnd ( endCB ) ;
124+ connection . end ( endCB ) ;
125125 }
126126 }
127127
@@ -200,7 +200,7 @@ class BasePool extends EventEmitter {
200200 Date . now ( ) - this . _freeConnections . get ( 0 ) . lastActiveTime >
201201 this . config . idleTimeout )
202202 ) {
203- this . _freeConnections . get ( 0 ) . _realEnd ( ) ;
203+ this . _freeConnections . get ( 0 ) . end ( ) ;
204204 }
205205 } finally {
206206 this . _removeIdleTimeoutConnections ( ) ;
Original file line number Diff line number Diff line change @@ -29,16 +29,9 @@ class BasePoolConnection extends BaseConnection {
2929 this . _pool . releaseConnection ( this ) ;
3030 }
3131
32- end ( ) {
33- const err = new Error (
34- 'Calling conn.end() to release a pooled connection is ' +
35- 'deprecated. In next version calling conn.end() will be ' +
36- 'restored to default conn.end() behavior. Use ' +
37- 'conn.release() instead.' ,
38- ) ;
39- this . emit ( 'warn' , err ) ;
40- console . warn ( err . message ) ;
41- this . release ( ) ;
32+ end ( callback ) {
33+ this . _removeFromPool ( ) ;
34+ super . end ( callback ) ;
4235 }
4336
4437 destroy ( ) {
@@ -58,6 +51,3 @@ class BasePoolConnection extends BaseConnection {
5851
5952BasePoolConnection . statementKey = BaseConnection . statementKey ;
6053module . exports = BasePoolConnection ;
61-
62- // TODO: Remove this when we are removing PoolConnection#end
63- BasePoolConnection . prototype . _realEnd = BaseConnection . prototype . end ;
You can’t perform that action at this time.
0 commit comments