start new instance if existing instance hung

This commit is contained in:
Damien Elmes 2014-08-26 15:25:22 +09:00
parent 591015417b
commit 346dfe1c7f

View File

@ -152,7 +152,8 @@ class AnkiApp(QApplication):
return False return False
sock.write(txt) sock.write(txt)
if not sock.waitForBytesWritten(self.TMOUT): if not sock.waitForBytesWritten(self.TMOUT):
raise Exception("existing instance not emptying") # existing instance running but hung
return False
sock.disconnectFromServer() sock.disconnectFromServer()
return True return True