Consume all pendingDatagrams from udpServer
This fixes a bug where receiving broadcast messages would stop working in case 2 messages have been received at the same time. The problem is that readReady will only emit once per batch of datagrams received, in case we receive 2 datagrams but only consume 1, readReady will never be emitted again.
This commit is contained in:
parent
3efaae6f88
commit
ba4c87abc1
1 changed files with 2 additions and 2 deletions
|
@ -107,13 +107,13 @@ void LanLinkProvider::newUdpConnection()
|
|||
|
||||
if (!success || receivedPackage->type() != PACKAGE_TYPE_IDENTITY) {
|
||||
delete receivedPackage;
|
||||
return;
|
||||
continue;
|
||||
}
|
||||
|
||||
if (receivedPackage->get<QString>("deviceId") == KdeConnectConfig::instance()->deviceId()) {
|
||||
//qCDebug(KDECONNECT_CORE) << "Ignoring my own broadcast";
|
||||
delete receivedPackage;
|
||||
return;
|
||||
continue;
|
||||
}
|
||||
|
||||
int tcpPort = receivedPackage->get<int>("tcpPort", port);
|
||||
|
|
Loading…
Reference in a new issue