Commits

Yuya Nishihara  committed cb95ce0

qtapp: unlink dead server socket on ECONNREFUSED for recovery (fixes #3290)

On Unix, the socket file may be left if TortoiseHg is crashed or killed.
On Windows, QLocalServer.removeServer() is noop.

  • Participants
  • Parent commits 32dcad9
  • Branches stable

Comments (0)

Files changed (1)

File tortoisehg/hgqt/qtapp.py

         reply = socket.readAll()
         if data == reply:
             return True
+    elif socket.error() == QLocalSocket.ConnectionRefusedError:
+        # last server process was crashed?
+        QLocalServer.removeServer(servername)
     return False