25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-11-20 16:15:59 +01:00

Better version of dialyzer fix

This commit is contained in:
Paweł Chmielowski 2021-11-16 10:59:53 +01:00
parent bdd4e52699
commit 97b8373fd2

View File

@ -64,7 +64,7 @@
%% once a server is temporary blocked, it stay blocked for 60 seconds %% once a server is temporary blocked, it stay blocked for 60 seconds
-record(s2s, {fromto :: {binary(), binary()}, -record(s2s, {fromto :: {binary(), binary()} | '_',
pid :: pid()}). pid :: pid()}).
-record(state, {}). -record(state, {}).
@ -249,7 +249,7 @@ handle_info({route, Packet}, State) ->
end, end,
{noreply, State}; {noreply, State};
handle_info({'DOWN', _Ref, process, Pid, _Reason}, 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] -> [#s2s{pid = Pid, fromto = {From, To}} = Obj] ->
F = fun() -> mnesia:delete_object(Obj) end, F = fun() -> mnesia:delete_object(Obj) end,
case mnesia:transaction(F) of case mnesia:transaction(F) of