Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Correctly close connection pool manager at exit #67

Merged
merged 1 commit into from
Mar 3, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
fix: Correctly close connection pool manager at exit
bednar committed Mar 3, 2020
commit 233d969698447b3e1ac0a4d244ac3bc2d679071a
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -5,6 +5,7 @@

### Bugs
1. [#61](https://github.com/influxdata/influxdb-client-python/issues/61): Correctly parse CSV where multiple results include multiple tables
1. [#66](https://github.com/influxdata/influxdb-client-python/issues/66): Correctly close connection pool manager at exit

## 1.4.0 [2020-02-14]

2 changes: 2 additions & 0 deletions influxdb_client/api_client.py
Original file line number Diff line number Diff line change
@@ -82,6 +82,8 @@ def __del__(self):
self._pool.close()
self._pool.join()
self._pool = None
if self.rest_client and self.rest_client.pool_manager and hasattr(self.rest_client.pool_manager, 'clear'):
self.rest_client.pool_manager.clear()

@property
def pool(self):
Original file line number Diff line number Diff line change
@@ -77,6 +77,8 @@ class ApiClient(object):
self._pool.close()
self._pool.join()
self._pool = None
if self.rest_client and self.rest_client.pool_manager and hasattr(self.rest_client.pool_manager, 'clear'):
self.rest_client.pool_manager.clear()

@property
def pool(self):