fix(cm): add a timeout to rpc_call function

An infinite wait will leave the client process waiting for
a return and cause the client to go to a dead state
This commit is contained in:
JianBo He 2021-07-13 11:00:11 +08:00
parent 750cb2d491
commit 258dd100f5
1 changed files with 1 additions and 1 deletions

View File

@ -376,7 +376,7 @@ lookup_channels(local, ClientId) ->
%% @private
rpc_call(Node, Fun, Args) ->
case rpc:call(Node, ?MODULE, Fun, Args) of
case rpc:call(Node, ?MODULE, Fun, Args, 2 * ?T_TAKEOVER) of
{badrpc, Reason} -> error(Reason);
Res -> Res
end.