diff options
author | rfkelly0 <rfkelly0@67cdc799-7952-0410-af00-57a81ceafa0f> | 2010-01-19 03:52:08 +0000 |
---|---|---|
committer | rfkelly0 <rfkelly0@67cdc799-7952-0410-af00-57a81ceafa0f> | 2010-01-19 03:52:08 +0000 |
commit | 5a016e0d263f2350ade80e0f1decdd600139fcfb (patch) | |
tree | 1eb85c6517bee78133f56d7d19b782bd97711b6f | |
parent | ad0675c85ca78cde6d529576df19b77c1d3cbdc0 (diff) | |
download | pyfilesystem-git-5a016e0d263f2350ade80e0f1decdd600139fcfb.tar.gz |
ConnectionManagerFS: make wait_for_connection exit on FS close
-rw-r--r-- | fs/remote.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/fs/remote.py b/fs/remote.py index ca435e9..9d844a1 100644 --- a/fs/remote.py +++ b/fs/remote.py @@ -232,7 +232,7 @@ class ConnectionManagerFS(LazyFS): self._connection_cond.release() def _poll_connection(self): - while not self.connected: + while not self.connected and not self.closed: try: self.wrapped_fs.isdir("") except RemoteConnectionError: @@ -244,7 +244,8 @@ class ConnectionManagerFS(LazyFS): break self._connection_cond.acquire() try: - self.connected = True + if not self.closed: + self.connected = True self._poll_thread = None self._connection_cond.notifyAll() finally: |