Skip to content

Commit 275473a

Browse files
committed
Destroy/end connections removed from the pool on error
fixes mysqljs#1072
1 parent 55f132c commit 275473a

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

Changes.md

+1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ you spot any mistakes.
66

77
## HEAD
88

9+
* Destroy/end connections removed from the pool on error
910
* Delay implied connect until after `.query` argument validation
1011
* Do not remove connections with non-fatal errors from the pool
1112
* Error early if `callback` argument to `.query` is not a function #1060

lib/PoolConnection.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -54,13 +54,13 @@ PoolConnection.prototype.destroy = function () {
5454
return Connection.prototype.destroy.apply(this, arguments);
5555
};
5656

57-
PoolConnection.prototype._removeFromPool = function(connection) {
57+
PoolConnection.prototype._removeFromPool = function _removeFromPool() {
5858
if (!this._pool || this._pool._closed) {
5959
return;
6060
}
6161

6262
var pool = this._pool;
6363
this._pool = null;
6464

65-
pool._removeConnection(this);
65+
pool._purgeConnection(this);
6666
};

0 commit comments

Comments
 (0)