fix: Fix cleanup_users for dead processes

This commit is contained in:
Yaroslav Rogov 2021-06-23 11:17:10 +03:00
parent c6f09fd640
commit ff808b00a1
No known key found for this signature in database
GPG Key ID: 5159F2A85653816B

View File

@ -524,7 +524,7 @@ cleanup_users(Snaps) ->
ets:foldl(
fun(Rec = #user{vsn = Version, pid = Pid, requested_at = '_'}, _) ->
case sets:is_element(Version, VersionMap) andalso erlang:is_alive(Pid) of
case sets:is_element(Version, VersionMap) andalso erlang:is_process_alive(Pid) of
true -> ok;
false -> ets:delete_object(?USERS_TABLE, Rec)
end