Commit 5a016e0d by rfkelly0

ConnectionManagerFS: make wait_for_connection exit on FS close

parent ad0675c8
...@@ -232,7 +232,7 @@ class ConnectionManagerFS(LazyFS): ...@@ -232,7 +232,7 @@ class ConnectionManagerFS(LazyFS):
self._connection_cond.release() self._connection_cond.release()
def _poll_connection(self): def _poll_connection(self):
while not self.connected: while not self.connected and not self.closed:
try: try:
self.wrapped_fs.isdir("") self.wrapped_fs.isdir("")
except RemoteConnectionError: except RemoteConnectionError:
...@@ -244,6 +244,7 @@ class ConnectionManagerFS(LazyFS): ...@@ -244,6 +244,7 @@ class ConnectionManagerFS(LazyFS):
break break
self._connection_cond.acquire() self._connection_cond.acquire()
try: try:
if not self.closed:
self.connected = True self.connected = True
self._poll_thread = None self._poll_thread = None
self._connection_cond.notifyAll() self._connection_cond.notifyAll()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment