mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-20 15:37:26 -06:00
Update qtsingleapplication
To upstream version a8dda66d7738cde9042b87db27993f710ae3eeeb
This commit is contained in:
committed by
sledgehammer999
parent
5b0ae0271b
commit
f53abd2f07
@@ -176,8 +176,17 @@ void QtLocalPeer::receiveConnection()
|
|||||||
if (!socket)
|
if (!socket)
|
||||||
return;
|
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();
|
socket->waitForReadyRead();
|
||||||
|
}
|
||||||
|
|
||||||
QDataStream ds(socket);
|
QDataStream ds(socket);
|
||||||
QByteArray uMsg;
|
QByteArray uMsg;
|
||||||
quint32 remaining;
|
quint32 remaining;
|
||||||
|
|||||||
Reference in New Issue
Block a user