mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-08-20 21:33:27 -07:00
Update qtsingleapplication
To upstream version a8dda66d7738cde9042b87db27993f710ae3eeeb
This commit is contained in:
parent
c7e35a1801
commit
e3da17caa8
1 changed files with 10 additions and 1 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue