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

Fixed weakref async credential close when self.credential is None #330

Open
wants to merge 16 commits into
base: main
Choose a base branch
from
4 changes: 3 additions & 1 deletion adlfs/spec.py
Original file line number Diff line number Diff line change
Expand Up @@ -466,7 +466,9 @@ def __init__(

self.do_connect()
weakref.finalize(self, sync, self.loop, close_service_client, self)
weakref.finalize(self, sync, self.loop, close_credential, self)

if self.credential is not None:
weakref.finalize(self, sync, self.loop, close_credential, self)

@classmethod
def _strip_protocol(cls, path: str):
Expand Down