File tree 2 files changed +12
-1
lines changed
2 files changed +12
-1
lines changed Original file line number Diff line number Diff line change 103
103
. option (
104
104
"--storage-backend <storage-class>" ,
105
105
"Define an external storage class. Defaults to in-MemoryStore."
106
+ )
107
+ . option (
108
+ "--keep-alive-timeout <timeout>" ,
109
+ "Set timeout (in milliseconds) for Keep-Alive connections" ,
110
+ 5000
106
111
) ;
107
112
108
113
// collects multiple flags to an object
@@ -269,6 +274,8 @@ options.redirectTo = args.redirectTo;
269
274
options . headers = args . customHeader ;
270
275
options . timeout = args . timeout ;
271
276
options . proxyTimeout = args . proxyTimeout ;
277
+ // cast to milliseconds, which is what
278
+ options . keepAliveTimeout = args . keepAliveTimeout ;
272
279
273
280
// metrics options
274
281
options . enableMetrics = ! ! args . metricsPort ;
Original file line number Diff line number Diff line change @@ -220,7 +220,11 @@ class ConfigurableProxy extends EventEmitter {
220
220
this . metricsServer = http . createServer ( metricsCallback ) ;
221
221
}
222
222
223
- var httpOptions = { keepAlive : true , agent : this . agent } ;
223
+ var httpOptions = {
224
+ keepAlive : true ,
225
+ agent : this . agent ,
226
+ keepAliveTimeout : this . options . keepAliveTimeout || 5000 ,
227
+ } ;
224
228
225
229
// proxy requests separately
226
230
var proxyCallback = logErrors ( this . handleProxyWeb ) ;
You can’t perform that action at this time.
0 commit comments