]> granicus.if.org Git - ejabberd/commitdiff
Intercept EXIT signal
authorEvgeniy Khramtsov <ekhramtsov@process-one.net>
Mon, 25 Jun 2018 11:46:31 +0000 (14:46 +0300)
committerEvgeniy Khramtsov <ekhramtsov@process-one.net>
Mon, 25 Jun 2018 11:46:31 +0000 (14:46 +0300)
src/xmpp_stream_out.erl

index 6cf762025009ab3e30715f9e582788bdb96ee7a6..3e777a7e9f164edc8da95ce694ec72334c07da31 100644 (file)
@@ -415,6 +415,8 @@ handle_info({tcp_closed, _}, State) ->
     handle_info({'$gen_event', closed}, State);
 handle_info({tcp_error, _, Reason}, State) ->
     noreply(process_stream_end({socket, Reason}, State));
+handle_info({'EXIT', _, Reason}, State) ->
+    {stop, Reason, State};
 handle_info(Info, State) ->
     noreply(try callback(handle_info, Info, State)
            catch _:{?MODULE, undef} -> State