aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLoïc Hoguin <[email protected]>2013-01-18 18:09:46 +0100
committerLoïc Hoguin <[email protected]>2013-01-18 18:09:46 +0100
commitacd6847d3df2d0bca923918bdc5040e9b68c9b3f (patch)
tree5f1afce71c1b1582ccdd7e2f0d5cd0ce609af0fd
parent529de4d51887669349e49ef8f25f79ba5e93fd43 (diff)
downloadcowboy-acd6847d3df2d0bca923918bdc5040e9b68c9b3f.tar.gz
cowboy-acd6847d3df2d0bca923918bdc5040e9b68c9b3f.tar.bz2
cowboy-acd6847d3df2d0bca923918bdc5040e9b68c9b3f.zip
Set max_keepalive default to 100 instead of infinity
-rw-r--r--src/cowboy_protocol.erl4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/cowboy_protocol.erl b/src/cowboy_protocol.erl
index 0e9982b..a0f571b 100644
--- a/src/cowboy_protocol.erl
+++ b/src/cowboy_protocol.erl
@@ -30,7 +30,7 @@
%% <dt>max_headers</dt><dd>Max number of headers allowed.
%% Defaults to 100.</dd>
%% <dt>max_keepalive</dt><dd>Max number of requests allowed in a single
-%% keep-alive session. Defaults to infinity.</dd>
+%% keep-alive session. Defaults to 100.</dd>
%% <dt>max_request_line_length</dt><dd>Max length allowed for the request
%% line. Defaults to 4096.</dd>
%% <dt>middlewares</dt><dd>The list of middlewares to execute when a
@@ -107,7 +107,7 @@ init(ListenerPid, Socket, Transport, Opts) ->
MaxHeaderNameLength = get_value(max_header_name_length, Opts, 64),
MaxHeaderValueLength = get_value(max_header_value_length, Opts, 4096),
MaxHeaders = get_value(max_headers, Opts, 100),
- MaxKeepalive = get_value(max_keepalive, Opts, infinity),
+ MaxKeepalive = get_value(max_keepalive, Opts, 100),
MaxRequestLineLength = get_value(max_request_line_length, Opts, 4096),
Middlewares = get_value(middlewares, Opts, [cowboy_router, cowboy_handler]),
Env = [{listener, ListenerPid}|get_value(env, Opts, [])],