diff options
Diffstat (limited to 'src/ejabberd_s2s_in.erl')
-rw-r--r-- | src/ejabberd_s2s_in.erl | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/ejabberd_s2s_in.erl b/src/ejabberd_s2s_in.erl index 2c838f76e..187869cfb 100644 --- a/src/ejabberd_s2s_in.erl +++ b/src/ejabberd_s2s_in.erl @@ -38,7 +38,7 @@ -export([handle_unexpected_info/2, handle_unexpected_cast/2, reject_unauthenticated_packet/2, process_closed/2]). %% API --export([stop/1, close/1, close/2, send/2, update_state/2, establish/1, +-export([stop_async/1, close/1, close/2, send/2, update_state/2, establish/1, host_up/1, host_down/1]). -include("xmpp.hrl"). @@ -64,8 +64,9 @@ close(Ref) -> close(Ref, Reason) -> xmpp_stream_in:close(Ref, Reason). -stop(Ref) -> - xmpp_stream_in:stop(Ref). +-spec stop_async(pid()) -> ok. +stop_async(Pid) -> + xmpp_stream_in:stop_async(Pid). accept(Ref) -> xmpp_stream_in:accept(Ref). @@ -130,7 +131,8 @@ process_closed(#{server := LServer} = State, Reason) -> end, ?INFO_MSG("Closing inbound s2s connection ~ts -> ~ts: ~ts", [RServer, LServer, xmpp_stream_out:format_error(Reason)]), - stop(State). + stop_async(self()), + State. %%%=================================================================== %%% xmpp_stream_in callbacks |