diff options
author | Loïc Hoguin <[email protected]> | 2013-02-09 21:46:05 +0100 |
---|---|---|
committer | Loïc Hoguin <[email protected]> | 2013-02-09 21:46:05 +0100 |
commit | 65ed13d2da2e6bab65fcde7db2e46060c33be71f (patch) | |
tree | 15e8d64cd609cd3ffb13171ec3cabea9aa8e8a94 /src/cowboy_websocket.erl | |
parent | 6879cd885954ba3e1a379b1f3dc1569fd1375925 (diff) | |
download | cowboy-65ed13d2da2e6bab65fcde7db2e46060c33be71f.tar.gz cowboy-65ed13d2da2e6bab65fcde7db2e46060c33be71f.tar.bz2 cowboy-65ed13d2da2e6bab65fcde7db2e46060c33be71f.zip |
Do not reset the connection timeout timer on send
Sends can be successful even if the connection is gone.
Diffstat (limited to 'src/cowboy_websocket.erl')
-rw-r--r-- | src/cowboy_websocket.erl | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/src/cowboy_websocket.erl b/src/cowboy_websocket.erl index debb69f..1a87732 100644 --- a/src/cowboy_websocket.erl +++ b/src/cowboy_websocket.erl @@ -534,8 +534,7 @@ handler_call(State=#state{handler=Handler, handler_opts=HandlerOpts}, Req, when is_tuple(Payload) -> case websocket_send(Payload, State) of ok -> - State2 = handler_loop_timeout(State), - NextState(State2, Req2, HandlerState2, RemainingData); + NextState(State, Req2, HandlerState2, RemainingData); shutdown -> handler_terminate(State, Req2, HandlerState, {normal, shutdown}); @@ -546,8 +545,7 @@ handler_call(State=#state{handler=Handler, handler_opts=HandlerOpts}, Req, when is_tuple(Payload) -> case websocket_send(Payload, State) of ok -> - State2 = handler_loop_timeout(State), - NextState(State2#state{hibernate=true}, + NextState(State#state{hibernate=true}, Req2, HandlerState2, RemainingData); shutdown -> handler_terminate(State, Req2, HandlerState, @@ -559,8 +557,7 @@ handler_call(State=#state{handler=Handler, handler_opts=HandlerOpts}, Req, when is_list(Payload) -> case websocket_send_many(Payload, State) of ok -> - State2 = handler_loop_timeout(State), - NextState(State2, Req2, HandlerState2, RemainingData); + NextState(State, Req2, HandlerState2, RemainingData); shutdown -> handler_terminate(State, Req2, HandlerState, {normal, shutdown}); @@ -571,8 +568,7 @@ handler_call(State=#state{handler=Handler, handler_opts=HandlerOpts}, Req, when is_list(Payload) -> case websocket_send_many(Payload, State) of ok -> - State2 = handler_loop_timeout(State), - NextState(State2#state{hibernate=true}, + NextState(State#state{hibernate=true}, Req2, HandlerState2, RemainingData); shutdown -> handler_terminate(State, Req2, HandlerState, |