Ignore errors when retrieving status if the users just got offline

Fix possible race condition.
This commit is contained in:
Mickaël Rémond 2015-03-20 11:42:32 +01:00
parent e2f860fd9f
commit cbea31ab68
1 changed files with 1 additions and 1 deletions

View File

@ -836,7 +836,7 @@ get_status_list(Host, Status_required) ->
end, end,
Sessions3 = [ {Pid, Server, Priority} || {{_User, Server, _Resource}, {_, Pid}, Priority} <- Sessions2, apply(Fhost, [Server, Host])], Sessions3 = [ {Pid, Server, Priority} || {{_User, Server, _Resource}, {_, Pid}, Priority} <- Sessions2, apply(Fhost, [Server, Host])],
%% For each Pid, get its presence %% For each Pid, get its presence
Sessions4 = [ {ejabberd_c2s:get_presence(Pid), Server, Priority} || {Pid, Server, Priority} <- Sessions3], Sessions4 = [ {catch ejabberd_c2s:get_presence(Pid), Server, Priority} || {Pid, Server, Priority} <- Sessions3],
%% Filter by status %% Filter by status
Fstatus = case Status_required of Fstatus = case Status_required of
<<"all">> -> <<"all">> ->