0
Fork 0
mirror of https://github.com/ninenines/cowboy.git synced 2025-07-14 12:20:24 +00:00

added a comment for non-obvious erlang:cancel_timer

This commit is contained in:
Alex Kovalev 2015-03-26 12:55:42 +03:00
parent c05143aba8
commit 1d99878561

View file

@ -84,6 +84,7 @@ handle_cast(_Msg, State) ->
-spec handle_info(any(), State) -> {noreply, State} when State::#state{}. -spec handle_info(any(), State) -> {noreply, State} when State::#state{}.
handle_info(update, #state{universaltime=Prev, rfc1123=B1, tref=TRef0}) -> 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),
T = erlang:universaltime(), T = erlang:universaltime(),
B2 = update_rfc1123(B1, Prev, T), B2 = update_rfc1123(B1, Prev, T),