influxdb-python icon indicating copy to clipboard operation
influxdb-python copied to clipboard

.close() does not seem to close the client

Open newskooler opened this issue 5 years ago • 0 comments

  • InfluxDB version: 1.8.0
  • InfluxDB-python version: 5.3.0
  • Python version: 3.7.7
  • Operating system version: Ubuntu 18.04

I am having the following issue/question: When I open a client via python, do something with it and then close it, I expect not to be able to use the client again (to ping, query, etc.), but this is possible for some reason.

For example, the following code:

from influxdb import InfluxDBClient

idb_client = InfluxDBClient(host, port, username, password)
print(idb_client._username)
print(idb_client.close())
print(idb_client.ping())

Yields this:

my_idb_user
None
1.8.0
my_idb_user

Why is that? If that is expected behaviour, then how do I close an established connection via python?

newskooler avatar Oct 21 '20 20:10 newskooler