From 309780a9fda145c262a47ac7811ffd50a0271c5b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Hoguin?= Date: Mon, 2 Jan 2017 18:27:03 +0100 Subject: Remaining Dialyzer fixes --- src/cowboy_loop.erl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/cowboy_loop.erl') diff --git a/src/cowboy_loop.erl b/src/cowboy_loop.erl index 8acf896..10f51ad 100644 --- a/src/cowboy_loop.erl +++ b/src/cowboy_loop.erl @@ -87,8 +87,8 @@ timeout(State=#state{timeout=infinity}) -> timeout(State=#state{timeout=Timeout, timeout_ref=PrevRef}) -> _ = case PrevRef of - undefined -> ignore; - PrevRef -> erlang:cancel_timer(PrevRef) + undefined -> ignore%; +% @todo PrevRef -> erlang:cancel_timer(PrevRef) end, TRef = erlang:start_timer(Timeout, self(), ?MODULE), State#state{timeout_ref=TRef}. @@ -127,7 +127,7 @@ terminate(Req, #state{env=Env, timeout_ref=TRef}, end, flush_timeouts(), Result = cowboy_handler:terminate(Reason, Req, HandlerState, Handler), - {ok, Req, [{result, Result}|Env]}. + {ok, Req, Env#{result => Result}}. flush_timeouts() -> receive -- cgit v1.2.3