Skip to content

Commit 7b79a74

Browse files
committed
Change name targetTimeout to proxyTimeout
1 parent 4193d3b commit 7b79a74

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

lib/http-proxy/passes/web-incoming.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -111,8 +111,8 @@ web_o = Object.keys(web_o).map(function(pass) {
111111

112112
// allow outgoing socket to timeout so that we could
113113
// show an error page at the initial request
114-
if(options.targetTimeout) {
115-
proxyReq.setTimeout(options.targetTimeout, function() {
114+
if(options.proxyTimeout) {
115+
proxyReq.setTimeout(options.proxyTimeout, function() {
116116
proxyReq.abort();
117117
});
118118
}

test/lib-http-proxy-passes-web-incoming-test.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -128,10 +128,10 @@ describe('#createProxyServer.web() using own http server', function () {
128128
}, function() {}).end();
129129
});
130130

131-
it('should proxy the request and handle timeout error (targetTimeout)', function(done) {
131+
it('should proxy the request and handle timeout error (proxyTimeout)', function(done) {
132132
var proxy = httpProxy.createProxyServer({
133133
target: 'http://127.0.0.1:45000',
134-
targetTimeout: 100
134+
proxyTimeout: 100
135135
});
136136

137137
require('net').createServer().listen(45000);

0 commit comments

Comments
 (0)