Browse Source

Merge pull request #7482 from Chocobo1/update

Update qtsingleapplication
adaptive-webui-19844
Mike Tzou 7 years ago committed by GitHub
parent
commit
de6ca29dcd
  1. 11
      src/app/qtsingleapplication/qtlocalpeer.cpp

11
src/app/qtsingleapplication/qtlocalpeer.cpp

@ -176,8 +176,17 @@ void QtLocalPeer::receiveConnection() @@ -176,8 +176,17 @@ void QtLocalPeer::receiveConnection()
if (!socket)
return;
while (socket->bytesAvailable() < (int)sizeof(quint32))
while (true) {
if (socket->state() == QLocalSocket::UnconnectedState) {
qWarning("QtLocalPeer: Peer disconnected");
delete socket;
return;
}
if (socket->bytesAvailable() >= qint64(sizeof(quint32)))
break;
socket->waitForReadyRead();
}
QDataStream ds(socket);
QByteArray uMsg;
quint32 remaining;

Loading…
Cancel
Save