aboutsummaryrefslogtreecommitdiffstats
path: root/test/ws_timeout_cancel_handler.erl
AgeCommit message (Collapse)Author
2012-12-22Cancel timer only on websocket_data receives or sendsJeremy Ong
This commit prevents erlang messages from keeping a websocket connection alive. Previously, the timer was canceled upon any activity. Now, the timeout is only canceled when actual data is sent from the client. The handler_loop_timeout/1 function is called from websocket_data/4 instead of handler_before_loop/4. It is also called after every successful reply in handler_call/4.