aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFredrik Gustafsson <[email protected]>2012-11-09 12:04:48 +0100
committerFredrik Gustafsson <[email protected]>2012-11-09 12:04:48 +0100
commit39537f88c45304d0fbd1cd61882fc7df7473041a (patch)
tree4a648ac64d1fc8805f2d8ddbc5a87d0fac14881f
parent3b452c27de38356a3926f716c448cbffb3763a69 (diff)
downloadotp-39537f88c45304d0fbd1cd61882fc7df7473041a.tar.gz
otp-39537f88c45304d0fbd1cd61882fc7df7473041a.tar.bz2
otp-39537f88c45304d0fbd1cd61882fc7df7473041a.zip
Reduced checking of bytes per second to every second
-rw-r--r--lib/inets/src/http_server/httpd_request_handler.erl6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/inets/src/http_server/httpd_request_handler.erl b/lib/inets/src/http_server/httpd_request_handler.erl
index 0f9e82fd29..56c934a0f6 100644
--- a/lib/inets/src/http_server/httpd_request_handler.erl
+++ b/lib/inets/src/http_server/httpd_request_handler.erl
@@ -278,9 +278,9 @@ handle_info(timeout, #state{mod = ModData} = State) ->
"server side timeout", ModData),
{stop, normal, State#state{response_sent = true}};
handle_info(check_data, #state{data = Data, byte_limit = Byte_Limit} = State) ->
- case Data >= (Byte_Limit * 10) of %% Ten seconds itnerval
+ case Data >= Byte_Limit of
true ->
- erlang:send_after(10000, self(), check_data),
+ erlang:send_after(1000, self(), check_data),
{noreply, State#state{data = 0}};
_ ->
{stop, normal, State#state{response_sent = true}}
@@ -631,7 +631,7 @@ data_receive_counter(State, Byte_limit) ->
false ->
State#state{data = 0};
Nr ->
- erlang:send_after(10000, self(), check_data),
+ erlang:send_after(1000, self(), check_data),
State#state{data = 0, byte_limit = Nr}
end.
cancel_request_timeout(#state{timer = undefined} = State) ->