aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/cowboy_clock.erl2
-rw-r--r--src/cowboy_http.erl2
-rw-r--r--src/cowboy_websocket.erl2
3 files changed, 3 insertions, 3 deletions
diff --git a/src/cowboy_clock.erl b/src/cowboy_clock.erl
index e2cdf62..b484394 100644
--- a/src/cowboy_clock.erl
+++ b/src/cowboy_clock.erl
@@ -93,7 +93,7 @@ handle_cast(_Msg, State) ->
-spec handle_info(any(), State) -> {noreply, State} when State::#state{}.
handle_info(update, #state{universaltime=Prev, rfc1123=B1, tref=TRef0}) ->
%% Cancel the timer in case an external process sent an update message.
- _ = erlang:cancel_timer(TRef0),
+ _ = erlang:cancel_timer(TRef0, [{async, true}, {info, false}]),
T = erlang:universaltime(),
B2 = update_rfc1123(B1, Prev, T),
ets:insert(?MODULE, {rfc1123, B2}),
diff --git a/src/cowboy_http.erl b/src/cowboy_http.erl
index 78d65d2..7c62b13 100644
--- a/src/cowboy_http.erl
+++ b/src/cowboy_http.erl
@@ -328,7 +328,7 @@ cancel_timeout(State=#state{timer=TimerRef}) ->
_ ->
%% Do a synchronous cancel and remove the message if any
%% to avoid receiving stray messages.
- _ = erlang:cancel_timer(TimerRef),
+ _ = erlang:cancel_timer(TimerRef, [{async, false}, {info, false}]),
receive
{timeout, TimerRef, _} -> ok
after 0 ->
diff --git a/src/cowboy_websocket.erl b/src/cowboy_websocket.erl
index 3d85a75..8d3ed08 100644
--- a/src/cowboy_websocket.erl
+++ b/src/cowboy_websocket.erl
@@ -391,7 +391,7 @@ set_idle_timeout(State=#state{opts=Opts, timeout_ref=PrevRef}, TimeoutNum) ->
%% options are changed dynamically.
_ = case PrevRef of
undefined -> ignore;
- PrevRef -> erlang:cancel_timer(PrevRef)
+ PrevRef -> erlang:cancel_timer(PrevRef, [{async, true}, {info, false}])
end,
case maps:get(idle_timeout, Opts, 60000) of
infinity ->