fix(kafka): detect connectivity in on_get_status
This commit is contained in:
parent
f92b1fb8f4
commit
75770f2842
|
@ -173,8 +173,11 @@ on_kafka_ack(_Partition, _Offset, _Extra) ->
|
||||||
%% Maybe need to bump some counters?
|
%% Maybe need to bump some counters?
|
||||||
ok.
|
ok.
|
||||||
|
|
||||||
on_get_status(_InstId, _State) ->
|
on_get_status(_InstId, #{client_id := ClientID}) ->
|
||||||
connected.
|
case wolff:check_connectivity(ClientID) of
|
||||||
|
ok -> connected;
|
||||||
|
_ -> disconnected
|
||||||
|
end.
|
||||||
|
|
||||||
%% Parse comma separated host:port list into a [{Host,Port}] list
|
%% Parse comma separated host:port list into a [{Host,Port}] list
|
||||||
hosts(Hosts) when is_binary(Hosts) ->
|
hosts(Hosts) when is_binary(Hosts) ->
|
||||||
|
|
Loading…
Reference in New Issue