26
1
mirror of https://github.com/processone/ejabberd.git synced 2024-12-26 17:38:45 +01:00

Intercept EXIT signal

This commit is contained in:
Evgeniy Khramtsov 2018-06-25 14:46:31 +03:00
parent 911ed4a7ca
commit c907915695

View File

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