File tree 2 files changed +6
-15
lines changed
2 files changed +6
-15
lines changed Original file line number Diff line number Diff line change @@ -121,7 +121,7 @@ class BasePool extends EventEmitter {
121
121
}
122
122
for ( let i = 0 ; i < this . _allConnections . length ; i ++ ) {
123
123
connection = this . _allConnections . get ( i ) ;
124
- connection . _realEnd ( endCB ) ;
124
+ connection . end ( endCB ) ;
125
125
}
126
126
}
127
127
@@ -200,7 +200,7 @@ class BasePool extends EventEmitter {
200
200
Date . now ( ) - this . _freeConnections . get ( 0 ) . lastActiveTime >
201
201
this . config . idleTimeout )
202
202
) {
203
- this . _freeConnections . get ( 0 ) . _realEnd ( ) ;
203
+ this . _freeConnections . get ( 0 ) . end ( ) ;
204
204
}
205
205
} finally {
206
206
this . _removeIdleTimeoutConnections ( ) ;
Original file line number Diff line number Diff line change @@ -29,16 +29,10 @@ class BasePoolConnection extends BaseConnection {
29
29
this . _pool . releaseConnection ( this ) ;
30
30
}
31
31
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
+
33
+ end ( callback ) {
34
+ this . _removeFromPool ( ) ;
35
+ super . end ( callback ) ;
42
36
}
43
37
44
38
destroy ( ) {
@@ -58,6 +52,3 @@ class BasePoolConnection extends BaseConnection {
58
52
59
53
BasePoolConnection . statementKey = BaseConnection . statementKey ;
60
54
module . 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