mirror of
https://github.com/http-party/node-http-proxy.git
synced 2025-12-08 20:59:18 +00:00
[debug] Removed pool as a dependency for stress test
This commit is contained in:
parent
266e5246ea
commit
73381cf71a
@ -145,16 +145,20 @@ HttpProxy.prototype = {
|
||||
self.body = '';
|
||||
|
||||
// Open new HTTP request to internal resource with will act as a reverse proxy pass
|
||||
var p = manager.getPool(port, server);
|
||||
sys.puts('Current pool count for ' + req.headers.host + ":" + port + ' ' + p.clients.length + ', Busy: ' + p.getBusy() + ', Free: ' + p.getFree());
|
||||
//var p = manager.getPool(port, server);
|
||||
//sys.puts('Current pool count for ' + req.headers.host + ":" + port + ' ' + p.clients.length + ', Busy: ' + p.getBusy() + ', Free: ' + p.getFree());
|
||||
|
||||
p.on('error', function (err) {
|
||||
//p.on('error', function (err) {
|
||||
// Remark: We should probably do something here
|
||||
// but this is a hot-fix because I don't think 'pool'
|
||||
// should be emitting this event.
|
||||
});
|
||||
//});
|
||||
|
||||
var client = http.createClient(port, server);
|
||||
var reverse_proxy = client.request(req.method, req.url, req.headers);
|
||||
|
||||
//p.request(req.method, req.url, req.headers, function (reverse_proxy) {
|
||||
|
||||
p.request(req.method, req.url, req.headers, function (reverse_proxy) {
|
||||
// Create an error handler so we can use it temporarily
|
||||
var error = function (err) {
|
||||
res.writeHead(500, {'Content-Type': 'text/plain'});
|
||||
@ -216,7 +220,8 @@ HttpProxy.prototype = {
|
||||
});
|
||||
|
||||
self.unwatch(req);
|
||||
});
|
||||
|
||||
//});
|
||||
},
|
||||
|
||||
proxyWebSocketRequest: function (port, server, host) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user