diff --git a/src/ui/control/controlworker.cpp b/src/ui/control/controlworker.cpp index 364ac607..65b99427 100644 --- a/src/ui/control/controlworker.cpp +++ b/src/ui/control/controlworker.cpp @@ -88,6 +88,11 @@ void ControlWorker::setupForAsync() socket()->setParent(this); connect(socket(), &QLocalSocket::disconnected, this, &ControlWorker::disconnected); + connect(socket(), &QLocalSocket::errorOccurred, this, + [&](QLocalSocket::LocalSocketError socketError) { + qWarning() << "Client error:" << id() << socketError << errorString(); + abort(); + }); connect(socket(), &QLocalSocket::readyRead, this, &ControlWorker::processRequest); } diff --git a/src/ui/control/controlworker.h b/src/ui/control/controlworker.h index e73a0e1f..9bf5c883 100644 --- a/src/ui/control/controlworker.h +++ b/src/ui/control/controlworker.h @@ -24,6 +24,7 @@ public: QLocalSocket *socket() const { return m_socket; } int id() const; + QString errorString() const; void setupForAsync();