aboutsummaryrefslogtreecommitdiffstats
path: root/src/cowboy_loop.erl
diff options
context:
space:
mode:
authorLoïc Hoguin <[email protected]>2017-01-02 18:27:03 +0100
committerLoïc Hoguin <[email protected]>2017-01-02 18:27:03 +0100
commit309780a9fda145c262a47ac7811ffd50a0271c5b (patch)
treeb225f145f8790230bd111792f7a8e377b099914e /src/cowboy_loop.erl
parent637706ff1fbebcde257d0ed63eb97337b43fd847 (diff)
downloadcowboy-309780a9fda145c262a47ac7811ffd50a0271c5b.tar.gz
cowboy-309780a9fda145c262a47ac7811ffd50a0271c5b.tar.bz2
cowboy-309780a9fda145c262a47ac7811ffd50a0271c5b.zip
Remaining Dialyzer fixes
Diffstat (limited to 'src/cowboy_loop.erl')
-rw-r--r--src/cowboy_loop.erl6
1 files changed, 3 insertions, 3 deletions
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