diff options
author | Louis-Philippe Gauthier <[email protected]> | 2014-03-11 11:27:26 -0400 |
---|---|---|
committer | Louis-Philippe Gauthier <[email protected]> | 2014-03-11 11:27:26 -0400 |
commit | c2b8801f43bcf4e2aa84413e31ea251bbd1af11c (patch) | |
tree | f138c20f015426f97cdbf821d7b8552e161e09d9 | |
parent | 2df0f574ba001f6906fd36ee79915525f8ed3630 (diff) | |
download | bullet-c2b8801f43bcf4e2aa84413e31ea251bbd1af11c.tar.gz bullet-c2b8801f43bcf4e2aa84413e31ea251bbd1af11c.tar.bz2 bullet-c2b8801f43bcf4e2aa84413e31ea251bbd1af11c.zip |
Add missing shutdown cases
-rw-r--r-- | src/bullet_handler.erl | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/bullet_handler.erl b/src/bullet_handler.erl index 55a81d9..93933f3 100644 --- a/src/bullet_handler.erl +++ b/src/bullet_handler.erl @@ -143,7 +143,9 @@ websocket_handle({text, Data}, Req, {ok, Req2, State#state{handler_state=HandlerState2}, hibernate}; {reply, Reply, Req2, HandlerState2} -> {reply, {text, Reply}, Req2, - State#state{handler_state=HandlerState2}, hibernate} + State#state{handler_state=HandlerState2}, hibernate}; + {shutdown, Req2, HandlerState2} -> + {shutdown, Req2, State#state{handler_state=HandlerState2}} end; websocket_handle(_Frame, Req, State) -> {ok, Req, State, hibernate}. @@ -155,7 +157,9 @@ websocket_info(Info, Req, State=#state{ {ok, Req2, State#state{handler_state=HandlerState2}, hibernate}; {reply, Reply, Req2, HandlerState2} -> {reply, {text, Reply}, Req2, - State#state{handler_state=HandlerState2}, hibernate} + State#state{handler_state=HandlerState2}, hibernate}; + {shutdown, Req2, HandlerState2} -> + {shutdown, Req2, State#state{handler_state=HandlerState2}} end. websocket_terminate(_Reason, Req, |