fix processing queued requests

This commit is contained in:
Roman Shtylman
2013-11-04 10:30:54 -05:00
parent 6afb75704a
commit 0bba03ccd2
2 changed files with 7 additions and 0 deletions

View File

@@ -135,6 +135,11 @@ Proxy.prototype.next_socket = function(cb) {
self.sockets.push(sock);
}
// no sockets left to process waiting requests
if (self.sockets.length === 0) {
return;
}
var wait = self.waiting.shift();
debug('processing queued cb');
if (wait) {