File tree Expand file tree Collapse file tree 2 files changed +5
-16
lines changed Expand file tree Collapse file tree 2 files changed +5
-16
lines changed Original file line number Diff line number Diff line change @@ -127,7 +127,7 @@ class Pool extends EventEmitter {
127127 }
128128 for ( let i = 0 ; i < this . _allConnections . length ; i ++ ) {
129129 connection = this . _allConnections . get ( i ) ;
130- connection . _realEnd ( endCB ) ;
130+ connection . end ( endCB ) ;
131131 }
132132 }
133133
@@ -205,7 +205,7 @@ class Pool extends EventEmitter {
205205 Date . now ( ) - this . _freeConnections . get ( 0 ) . lastActiveTime >
206206 this . config . idleTimeout )
207207 ) {
208- this . _freeConnections . get ( 0 ) . _realEnd ( ) ;
208+ this . _freeConnections . get ( 0 ) . end ( ) ;
209209 }
210210 } finally {
211211 this . _removeIdleTimeoutConnections ( ) ;
Original file line number Diff line number Diff line change @@ -34,17 +34,9 @@ class PoolConnection extends Connection {
3434 return new PromisePoolConnection ( this , promiseImpl ) ;
3535 }
3636
37- end ( ) {
38- const err = new Error (
39- 'Calling conn.end() to release a pooled connection is ' +
40- 'deprecated. In next version calling conn.end() will be ' +
41- 'restored to default conn.end() behavior. Use ' +
42- 'conn.release() instead.'
43- ) ;
44- this . emit ( 'warn' , err ) ;
45- // eslint-disable-next-line no-console
46- console . warn ( err . message ) ;
47- this . release ( ) ;
37+ end ( callback ) {
38+ this . _removeFromPool ( ) ;
39+ super . end ( callback ) ;
4840 }
4941
5042 destroy ( ) {
@@ -64,6 +56,3 @@ class PoolConnection extends Connection {
6456
6557PoolConnection . statementKey = Connection . statementKey ;
6658module . exports = PoolConnection ;
67-
68- // TODO: Remove this when we are removing PoolConnection#end
69- PoolConnection . prototype . _realEnd = Connection . prototype . end ;
You can’t perform that action at this time.
0 commit comments