aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAlex Kovalev <[email protected]>2015-03-26 12:55:42 +0300
committerLoïc Hoguin <[email protected]>2015-05-06 11:27:49 +0300
commit817c6ed7c06c4dbc96a9717b036e37e4dbf58c2b (patch)
tree25b500b89e08c75c5544da23e92951bd1a2d69dd /src
parentf25e452139478c0c24ac8462458a2324ba7b1763 (diff)
downloadcowboy-817c6ed7c06c4dbc96a9717b036e37e4dbf58c2b.tar.gz
cowboy-817c6ed7c06c4dbc96a9717b036e37e4dbf58c2b.tar.bz2
cowboy-817c6ed7c06c4dbc96a9717b036e37e4dbf58c2b.zip
added a comment for non-obvious erlang:cancel_timer
Diffstat (limited to 'src')
-rw-r--r--src/cowboy_clock.erl1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/cowboy_clock.erl b/src/cowboy_clock.erl
index 66fd5d4..c81b486 100644
--- a/src/cowboy_clock.erl
+++ b/src/cowboy_clock.erl
@@ -84,6 +84,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),
T = erlang:universaltime(),
B2 = update_rfc1123(B1, Prev, T),