Change name targetTimeout to proxyTimeout

This commit is contained in:
Damian Kaczmarek 2014-06-10 19:04:12 +02:00
parent 4193d3bd74
commit 7b79a7409a
2 changed files with 4 additions and 4 deletions

View File

@ -111,8 +111,8 @@ web_o = Object.keys(web_o).map(function(pass) {
// allow outgoing socket to timeout so that we could
// show an error page at the initial request
if(options.targetTimeout) {
proxyReq.setTimeout(options.targetTimeout, function() {
if(options.proxyTimeout) {
proxyReq.setTimeout(options.proxyTimeout, function() {
proxyReq.abort();
});
}

View File

@ -128,10 +128,10 @@ describe('#createProxyServer.web() using own http server', function () {
}, function() {}).end();
});
it('should proxy the request and handle timeout error (targetTimeout)', function(done) {
it('should proxy the request and handle timeout error (proxyTimeout)', function(done) {
var proxy = httpProxy.createProxyServer({
target: 'http://127.0.0.1:45000',
targetTimeout: 100
proxyTimeout: 100
});
require('net').createServer().listen(45000);