Commit 5a9808e0 authored by Àlex Fiestas's avatar Àlex Fiestas Committed by Albert Vaca Cintora

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.
parent 02eb9a58
......@@ -105,7 +105,7 @@ void LanLinkProvider::newUdpConnection()
if (!success || receivedPackage->type() != PACKAGE_TYPE_IDENTITY) {
delete receivedPackage;
return;
continue;
}
KSharedConfigPtr config = KSharedConfig::openConfig("kdeconnectrc");
......@@ -114,7 +114,7 @@ void LanLinkProvider::newUdpConnection()
if (receivedPackage->get<QString>("deviceId") == myId) {
//kDebug(debugArea()) << "Ignoring my own broadcast";
delete receivedPackage;
return;
continue;
}
int tcpPort = receivedPackage->get<int>("tcpPort", port);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment