diff options
author | Loïc Hoguin <[email protected]> | 2014-06-03 12:43:52 +0200 |
---|---|---|
committer | Loïc Hoguin <[email protected]> | 2014-06-03 12:43:52 +0200 |
commit | 2d64d092a5685664a5f69abb65be78cbbb11fe3f (patch) | |
tree | c9b2850e453b641abe6907341859e8231c8c8541 /src | |
parent | 8fd69aa536b8de48df055258c3d90c363a78ccb2 (diff) | |
parent | c2b8801f43bcf4e2aa84413e31ea251bbd1af11c (diff) | |
download | bullet-2d64d092a5685664a5f69abb65be78cbbb11fe3f.tar.gz bullet-2d64d092a5685664a5f69abb65be78cbbb11fe3f.tar.bz2 bullet-2d64d092a5685664a5f69abb65be78cbbb11fe3f.zip |
Merge branch 'shutdown' of git://github.com/lpgauth/bullet
Diffstat (limited to 'src')
-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 3ec5830..247e1cc 100644 --- a/src/bullet_handler.erl +++ b/src/bullet_handler.erl @@ -144,7 +144,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}. @@ -156,7 +158,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, |