Skip to content

Commit 60791f3

Browse files
committed
[minor] Pushing hot-fix from Mikeal for vendored pool repo
1 parent 9128a8c commit 60791f3

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

vendor/pool/main.js

+7
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,13 @@ sys.inherits(Pool, events.EventEmitter);
2020
Pool.prototype.getClient = function (cb) {
2121
for (var i=0;i<this.clients.length;i+=1) {
2222
if (!this.clients[i].busy) {
23+
// Check if the client closed unexpectedly
24+
if (this.clients[i].readyState === 'closed') {
25+
delete this.clients[i];
26+
this.clients[i] = http.createClient(this.port, this.host, this.https, this.credentials);
27+
this.clients[i].busy = false;
28+
}
29+
2330
if (this.clients.length > this.maxClients) {
2431
this.clients[i].end();
2532
this.clients.splice(i, 1);

0 commit comments

Comments
 (0)