1
0
mirror of https://github.com/d47081/qBittorrent.git synced 2025-02-03 02:14:16 +00:00

Merge pull request #7482 from Chocobo1/update

Update qtsingleapplication
This commit is contained in:
Mike Tzou 2017-09-24 22:39:59 +08:00 committed by GitHub
commit de6ca29dcd

View File

@ -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;