From 8910ace851e68a051a09b7cae8d92a0354b689ec Mon Sep 17 00:00:00 2001 From: "anton.cherkasov" Date: Tue, 13 Jun 2017 14:13:23 +0300 Subject: [PATCH 1/2] Add method close to InfluxDBClient class. This method just closes Session if it's exist. --- influxdb/client.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/influxdb/client.py b/influxdb/client.py index 5f415abc..400d7e0e 100644 --- a/influxdb/client.py +++ b/influxdb/client.py @@ -827,6 +827,11 @@ def send_packet(self, packet, protocol='json'): data = ('\n'.join(packet) + '\n').encode('utf-8') self.udp_socket.sendto(data, (self._host, self.udp_port)) + def close(self): + """Close http session.""" + if self._session: + self._session.close() + def parse_dsn(dsn): conn_params = urlparse(dsn) From 0a3ee336d507f5bc61fbdfd0680929cbdc342b17 Mon Sep 17 00:00:00 2001 From: "anton.cherkasov" Date: Tue, 13 Jun 2017 14:40:32 +0300 Subject: [PATCH 2/2] Add method close to InfluxDBClient class. This method just closes Session if it's exist. --- influxdb/client.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/influxdb/client.py b/influxdb/client.py index 400d7e0e..24905c3a 100644 --- a/influxdb/client.py +++ b/influxdb/client.py @@ -829,7 +829,7 @@ def send_packet(self, packet, protocol='json'): def close(self): """Close http session.""" - if self._session: + if isinstance(self._session, requests.Session): self._session.close() pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy