From f9092126fafe063513444ca2b3c2aec6af14ed7b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Hoguin?= Date: Tue, 13 Mar 2018 11:19:13 +0100 Subject: Handle system messages in cowboy_websocket --- src/cowboy_http.erl | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/cowboy_http.erl') diff --git a/src/cowboy_http.erl b/src/cowboy_http.erl index 62e5176..6a75a1a 100644 --- a/src/cowboy_http.erl +++ b/src/cowboy_http.erl @@ -192,6 +192,7 @@ loop(State=#state{parent=Parent, socket=Socket, transport=Transport, opts=Opts, loop(State, Buffer); %% System messages. {'EXIT', Parent, Reason} -> + %% @todo We should exit gracefully, if possible. exit(Reason); {system, From, Request} -> sys:handle_system_msg(Request, From, Parent, ?MODULE, [], {State, Buffer}); @@ -1224,6 +1225,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()}. -- cgit v1.2.3