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 break
except KeyboardInterrupt: except KeyboardInterrupt:
continue continue
except EOFError: except (rpyc.AsyncResultTimeout, ReferenceError, EOFError):
break
except rpyc.AsyncResultTimeout:
logging.debug("connection %s seems blocked, reinitialising..."%str(m)) 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 break
def is_finished(self): def is_finished(self):