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 728100c commit bdfd699Copy full SHA for bdfd699
src/openai/_base_client.py
@@ -769,6 +769,9 @@ def __init__(self, **kwargs: Any) -> None:
769
770
class SyncHttpxClientWrapper(DefaultHttpxClient):
771
def __del__(self) -> None:
772
+ if self.is_closed:
773
+ return
774
+
775
try:
776
self.close()
777
except Exception:
@@ -1351,6 +1354,9 @@ def __init__(self, **kwargs: Any) -> None:
1351
1354
1352
1355
class AsyncHttpxClientWrapper(DefaultAsyncHttpxClient):
1353
1356
1357
1358
1359
1360
1361
# TODO(someday): support non asyncio runtimes here
1362
asyncio.get_running_loop().create_task(self.aclose())
0 commit comments