We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9c5cd8d commit fb118cfCopy full SHA for fb118cf
lib/pool.js
@@ -35,13 +35,18 @@ var pools = {
35
36
// Remove connection from pool on disconnect
37
client.on('end', function(e) {
38
- pool.destroy(client);
+ // Do not enter infinite loop between pool.destroy
39
+ // and client 'end' event...
40
+ if ( ! client._destroying ) {
41
+ pool.destroy(client);
42
+ }
43
});
44
45
return cb(null, client);
46
47
},
48
destroy: function(client) {
49
+ client._destroying = true;
50
client.end();
51
}
52
0 commit comments