fix(influxdb): ensure client is stopped before returning error

This commit is contained in:
Zaiming (Stone) Shi 2023-01-24 12:54:42 +01:00
parent 2416aeebc7
commit feb0238911
1 changed files with 2 additions and 0 deletions

View File

@ -248,6 +248,8 @@ do_start_client(
client => Client, client => Client,
reason => "client is not alive" reason => "client is not alive"
}), }),
%% no leak
_ = influxdb:stop_client(Client),
{error, influxdb_client_not_alive} {error, influxdb_client_not_alive}
end; end;
{error, {already_started, Client0}} -> {error, {already_started, Client0}} ->