Ignore errors during disconnection by timeout

This commit is contained in:
Oleksii Shevchuk 2016-10-24 23:54:57 +03:00
parent a24617b6fd
commit be76d6a476
1 changed files with 6 additions and 4 deletions

View File

@ -188,11 +188,13 @@ class PupyJob(object):
break
except KeyboardInterrupt:
continue
except EOFError:
break
except rpyc.AsyncResultTimeout:
except (rpyc.AsyncResultTimeout, ReferenceError, EOFError):
logging.debug("connection %s seems blocked, reinitialising..."%str(m))
m.client.conn._conn.close()
try:
m.client.conn._conn.close()
except (rpyc.AsyncResultTimeout, ReferenceError, EOFError):
pass
break
def is_finished(self):