Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 6633202

Browse filesBrowse files
committed
fixup! Add idleConnectionTimeout to pool options
Use conn.end instead of conn.destroy for closing idle connections
1 parent fc44254 commit 6633202
Copy full SHA for 6633202

File tree

Expand file treeCollapse file tree

1 file changed

+3
-1
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+3
-1
lines changed

‎lib/PoolConnection.js

Copy file name to clipboardExpand all lines: lib/PoolConnection.js
+3-1Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ var Events = require('events');
55
module.exports = PoolConnection;
66
inherits(PoolConnection, Connection);
77

8+
function _noop() {}
9+
810
function PoolConnection(pool, options) {
911
Connection.call(this, options);
1012
this._pool = pool;
@@ -34,7 +36,7 @@ PoolConnection.prototype.release = function release() {
3436

3537
if (this._pool.config.idleConnectionTimeout) {
3638
this._idleTimeout = setTimeout(
37-
this.destroy.bind(this),
39+
this._realEnd.bind(this, _noop),
3840
this._pool.config.idleConnectionTimeout
3941
);
4042
}

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.