aboutsummaryrefslogtreecommitdiffstats
path: root/src/cowboy_http2.erl
diff options
context:
space:
mode:
authorLoïc Hoguin <[email protected]>2018-03-13 11:19:13 +0100
committerLoïc Hoguin <[email protected]>2018-03-13 11:19:13 +0100
commitf9092126fafe063513444ca2b3c2aec6af14ed7b (patch)
treeb24a5655c2b21f79b663f10822e79d15477ebd84 /src/cowboy_http2.erl
parentb9c8d86502a76cf3a72af30fc6aa0fc88ca7afff (diff)
downloadcowboy-f9092126fafe063513444ca2b3c2aec6af14ed7b.tar.gz
cowboy-f9092126fafe063513444ca2b3c2aec6af14ed7b.tar.bz2
cowboy-f9092126fafe063513444ca2b3c2aec6af14ed7b.zip
Handle system messages in cowboy_websocket
Diffstat (limited to 'src/cowboy_http2.erl')
-rw-r--r--src/cowboy_http2.erl2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/cowboy_http2.erl b/src/cowboy_http2.erl
index 7dbfb24..b21d6da 100644
--- a/src/cowboy_http2.erl
+++ b/src/cowboy_http2.erl
@@ -225,6 +225,7 @@ loop(State=#state{parent=Parent, socket=Socket, transport=Transport,
terminate(State, {socket_error, Reason, 'An error has occurred on the socket.'});
%% System messages.
{'EXIT', Parent, Reason} ->
+ %% @todo We should exit gracefully.
exit(Reason);
{system, From, Request} ->
sys:handle_system_msg(Request, From, Parent, ?MODULE, [], {State, Buffer});
@@ -1125,6 +1126,7 @@ system_continue(_, _, {State, Buffer}) ->
-spec system_terminate(any(), _, _, {#state{}, binary()}) -> no_return().
system_terminate(Reason, _, _, {State, _}) ->
+ %% @todo We should exit gracefully, if possible.
terminate(State, Reason).
-spec system_code_change(Misc, _, _, _) -> {ok, Misc} when Misc::{#state{}, binary()}.