ipc: Disconnect properly from server.

This commit is contained in:
Florian Bruhin 2015-08-30 20:35:50 +02:00
parent a1cb47936a
commit 6dbd669efe

View File

@ -279,6 +279,9 @@ def send_to_running_instance(socketname, command):
if socket.error() != QLocalSocket.UnknownSocketError:
_socket_error("writing to running instance", socket)
else:
socket.disconnectFromServer()
if socket.state() != QLocalSocket.UnconnectedState:
socket.waitForDisconnected(100)
return True
else:
if socket.error() not in (QLocalSocket.ConnectionRefusedError,