mirror of
https://github.com/http-party/node-http-proxy.git
synced 2025-12-08 20:59:18 +00:00
Change name targetTimeout to proxyTimeout
This commit is contained in:
parent
4193d3bd74
commit
7b79a7409a
@ -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();
|
||||
});
|
||||
}
|
||||
|
||||
@ -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);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user