fix(rocketmq): fix that the status check of RocketMQ bridge may not accurate
This commit is contained in:
parent
c2385f85d6
commit
f602900a53
|
@ -154,12 +154,15 @@ on_batch_query(_InstanceId, Query, _State) ->
|
|||
|
||||
on_get_status(_InstanceId, #{client_id := ClientId}) ->
|
||||
case rocketmq_client_sup:find_client(ClientId) of
|
||||
{ok, _Pid} ->
|
||||
connected;
|
||||
{ok, Pid} ->
|
||||
status_result(rocketmq_client:get_status(Pid));
|
||||
_ ->
|
||||
connecting
|
||||
end.
|
||||
|
||||
status_result(_Status = true) -> connected;
|
||||
status_result(_Status) -> connecting.
|
||||
|
||||
%%========================================================================================
|
||||
%% Helper fns
|
||||
%%========================================================================================
|
||||
|
|
Loading…
Reference in New Issue