Skip to content

Commit ec6d517

Browse files
committed
fix(rpc): Follow-up to the previous fix
1 parent 1cfddf5 commit ec6d517

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/mria_status.erl

+6-1
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,12 @@ start_link() ->
8686
%% as compared with `get_core_node'.
8787
-spec upstream_node(mria_rlog:shard(), timeout()) -> {ok, node()} | timeout.
8888
upstream_node(Shard, Timeout) ->
89-
optvar:read(?optvar({?core_node, Shard}), Timeout).
89+
case optvar:read(?optvar({?upstream_pid, Shard}), Timeout) of
90+
{ok, Pid} ->
91+
{ok, node(Pid)};
92+
timeout ->
93+
timeout
94+
end.
9095

9196
%% @doc Return pid of the core node agent that serves us.
9297
-spec upstream(mria_rlog:shard()) -> {ok, pid()} | disconnected.

0 commit comments

Comments
 (0)