Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix return type of net_kernel:handle_exit function. #47

Open
wants to merge 1 commit into
base: emqx-OTP-26.1.2
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 14 additions & 12 deletions lib/kernel/src/net_kernel.erl
Original file line number Diff line number Diff line change
Expand Up @@ -1279,18 +1279,20 @@ generate_node_name(Host, State0) ->
%% -----------------------------------------------------------

handle_exit(Pid, Reason, State) ->
catch do_handle_exit(Pid, Reason, State).

do_handle_exit(Pid, Reason, State) ->
listen_exit(Pid, Reason, State),
accept_exit(Pid, Reason, State),
conn_own_exit(Pid, Reason, State),
dist_ctrlr_exit(Pid, Reason, State),
pending_own_exit(Pid, Reason, State),
ticker_exit(Pid, Reason, State),
restarter_exit(Pid, Reason, State),
verbose({'EXIT', Pid, Reason}, 2, State),
{noreply,State}.
try
listen_exit(Pid, Reason, State),
accept_exit(Pid, Reason, State),
conn_own_exit(Pid, Reason, State),
dist_ctrlr_exit(Pid, Reason, State),
pending_own_exit(Pid, Reason, State),
ticker_exit(Pid, Reason, State),
restarter_exit(Pid, Reason, State),
verbose({'EXIT', Pid, Reason}, 2, State)
catch
EC:Err:Stack ->
error_msg("** Netkernel cleanup failure **~n~p:~p ~p", [EC, Err, Stack])
end,
{noreply, State}.

listen_exit(Pid, Reason, State) ->
case lists:keymember(Pid, ?LISTEN_ID, State#state.listen) of
Expand Down
Loading