fix(influxdb): ensure client is stopped before returning error
This commit is contained in:
parent
2416aeebc7
commit
feb0238911
|
@ -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}} ->
|
||||||
|
|
Loading…
Reference in New Issue