fix(emqx_connection): do not raise an exception for normal shutdown

This commit is contained in:
William Yang 2023-01-11 16:24:37 +01:00
parent 1692a16778
commit 98a72d40ce
1 changed files with 6 additions and 0 deletions

View File

@ -680,6 +680,12 @@ maybe_raise_exception(#{
stacktrace := Stacktrace stacktrace := Stacktrace
}) -> }) ->
erlang:raise(Exception, Context, Stacktrace); erlang:raise(Exception, Context, Stacktrace);
maybe_raise_exception({shutdown, normal}) ->
ok;
maybe_raise_exception(normal) ->
ok;
maybe_raise_exception(shutdown) ->
ok;
maybe_raise_exception(Reason) -> maybe_raise_exception(Reason) ->
exit(Reason). exit(Reason).