mirror of
https://github.com/bitinflow/server.git
synced 2026-03-13 13:35:53 +00:00
fix processing queued requests
This commit is contained in:
5
proxy.js
5
proxy.js
@@ -135,6 +135,11 @@ Proxy.prototype.next_socket = function(cb) {
|
|||||||
self.sockets.push(sock);
|
self.sockets.push(sock);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// no sockets left to process waiting requests
|
||||||
|
if (self.sockets.length === 0) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
var wait = self.waiting.shift();
|
var wait = self.waiting.shift();
|
||||||
debug('processing queued cb');
|
debug('processing queued cb');
|
||||||
if (wait) {
|
if (wait) {
|
||||||
|
|||||||
@@ -199,6 +199,8 @@ module.exports = function(opt) {
|
|||||||
});
|
});
|
||||||
|
|
||||||
var server = bouncy(function(req, res, bounce) {
|
var server = bouncy(function(req, res, bounce) {
|
||||||
|
debug('request %s', req.url);
|
||||||
|
|
||||||
// if we should bounce this request, then don't send to our server
|
// if we should bounce this request, then don't send to our server
|
||||||
if (maybe_bounce(req, res, bounce)) {
|
if (maybe_bounce(req, res, bounce)) {
|
||||||
return;
|
return;
|
||||||
|
|||||||
Reference in New Issue
Block a user