We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 759505d commit f64bec6Copy full SHA for f64bec6
src/openai/_base_client.py
@@ -768,6 +768,9 @@ def __init__(self, **kwargs: Any) -> None:
768
769
class SyncHttpxClientWrapper(DefaultHttpxClient):
770
def __del__(self) -> None:
771
+ if self.is_closed:
772
+ return
773
+
774
try:
775
self.close()
776
except Exception:
@@ -1350,6 +1353,9 @@ def __init__(self, **kwargs: Any) -> None:
1350
1353
1351
1354
class AsyncHttpxClientWrapper(DefaultAsyncHttpxClient):
1352
1355
1356
1357
1358
1359
1360
# TODO(someday): support non asyncio runtimes here
1361
asyncio.get_running_loop().create_task(self.aclose())
0 commit comments