We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9128a8c commit 60791f3Copy full SHA for 60791f3
vendor/pool/main.js
@@ -20,6 +20,13 @@ sys.inherits(Pool, events.EventEmitter);
20
Pool.prototype.getClient = function (cb) {
21
for (var i=0;i<this.clients.length;i+=1) {
22
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
+
30
if (this.clients.length > this.maxClients) {
31
this.clients[i].end();
32
this.clients.splice(i, 1);
0 commit comments