diff --git a/src/ejabberd_s2s.erl b/src/ejabberd_s2s.erl index 71b3c8e17..04490071c 100644 --- a/src/ejabberd_s2s.erl +++ b/src/ejabberd_s2s.erl @@ -64,7 +64,7 @@ %% once a server is temporary blocked, it stay blocked for 60 seconds --record(s2s, {fromto :: {binary(), binary()}, +-record(s2s, {fromto :: {binary(), binary()} | '_', pid :: pid()}). -record(state, {}). @@ -249,7 +249,7 @@ handle_info({route, Packet}, State) -> end, {noreply, State}; handle_info({'DOWN', _Ref, process, Pid, _Reason}, State) -> - case mnesia:dirty_match_object(s2s, {s2s, '_', Pid}) of + case mnesia:dirty_match_object(s2s, #s2s{fromto = '_', pid = Pid}) of [#s2s{pid = Pid, fromto = {From, To}} = Obj] -> F = fun() -> mnesia:delete_object(Obj) end, case mnesia:transaction(F) of