diff options
author | Kai Koehne <kai.koehne@theqtcompany.com> | 2015-02-10 16:21:26 +0100 |
---|---|---|
committer | Kai Koehne <kai.koehne@theqtcompany.com> | 2015-02-20 10:22:28 +0000 |
commit | d6bca86cad962a0078c2a8111133cff123f1ba0a (patch) | |
tree | 0f8cf9863c04675c24efe2bf6b0aa023a56a0f4c /src/libs/installer/keepaliveobject.cpp | |
parent | 0ff36e52afb503a99c8fded093d25321a46b3d19 (diff) |
Use local sockets for client-server communication
Change-Id: I12bfef671ab31ae9fb8c4bb02776517e7f434d27
Task-number: QTIFW-228
Reviewed-by: Karsten Heimrich <karsten.heimrich@theqtcompany.com>
Diffstat (limited to 'src/libs/installer/keepaliveobject.cpp')
-rw-r--r-- | src/libs/installer/keepaliveobject.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/libs/installer/keepaliveobject.cpp b/src/libs/installer/keepaliveobject.cpp index e731a3f48..514ca5a7a 100644 --- a/src/libs/installer/keepaliveobject.cpp +++ b/src/libs/installer/keepaliveobject.cpp @@ -38,7 +38,7 @@ #include <QCoreApplication> #include <QElapsedTimer> #include <QHostAddress> -#include <QTcpSocket> +#include <QLocalSocket> #include <QTimer> namespace QInstaller { @@ -67,12 +67,12 @@ void KeepAliveObject::onTimeout() { // Try to connect to the privileged running server. If we succeed the server side // watchdog gets restarted and the server keeps running for another 30 seconds. - QTcpSocket socket; - socket.connectToHost(RemoteClient::instance().address(), RemoteClient::instance().port()); + QLocalSocket socket; + socket.connectToServer(RemoteClient::instance().socketName()); QElapsedTimer stopWatch; stopWatch.start(); - while ((socket.state() == QAbstractSocket::ConnectingState) + while ((socket.state() == QLocalSocket::ConnectingState) && (stopWatch.elapsed() < 10000) && (!m_quit)) { if ((stopWatch.elapsed() % 2500) == 0) QCoreApplication::processEvents(); |