File tree Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -33,8 +33,9 @@ public class KestrelServerLimits
3333 // Matches the default LimitRequestFields in Apache httpd.
3434 private int _maxRequestHeaderCount = 100 ;
3535
36- // Matches the default http.sys connectionTimeout.
37- private TimeSpan _keepAliveTimeout = TimeSpan . FromMinutes ( 2 ) ;
36+ // Slightly more than SocketHttpHandler's old PooledConnectionIdleTimeout of 2 minutes.
37+ // https://github.com/dotnet/runtime/issues/52267
38+ private TimeSpan _keepAliveTimeout = TimeSpan . FromSeconds ( 130 ) ;
3839
3940 private TimeSpan _requestHeadersTimeout = TimeSpan . FromSeconds ( 30 ) ;
4041
@@ -169,7 +170,7 @@ public long? MaxRequestBodySize
169170
170171 /// <summary>
171172 /// Gets or sets the keep-alive timeout.
172- /// Defaults to 2 minutes .
173+ /// Defaults to 130 seconds .
173174 /// </summary>
174175 /// <remarks>
175176 /// </remarks>
Original file line number Diff line number Diff line change @@ -150,7 +150,7 @@ public void MaxRequestHeaderCountValid(int value)
150150 [ Fact ]
151151 public void KeepAliveTimeoutDefault ( )
152152 {
153- Assert . Equal ( TimeSpan . FromMinutes ( 2 ) , new KestrelServerLimits ( ) . KeepAliveTimeout ) ;
153+ Assert . Equal ( TimeSpan . FromSeconds ( 130 ) , new KestrelServerLimits ( ) . KeepAliveTimeout ) ;
154154 }
155155
156156 [ Theory ]
You can’t perform that action at this time.
0 commit comments