Add a way to disable UDP broadcasts for testing

This commit is contained in:
Albert Vaca Cintora 2023-06-22 23:22:24 +02:00
parent 9e51b7d814
commit 8c69e48e2f

View file

@ -144,6 +144,10 @@ void LanLinkProvider::broadcastToNetwork()
void LanLinkProvider::broadcastUdpIdentityPacket()
{
if (qEnvironmentVariableIsSet("KDECONNECT_DISABLE_UDP_BROADCAST")) {
qWarning() << "Not broadcasting UDP because KDECONNECT_DISABLE_UDP_BROADCAST is set";
return;
}
sendUdpIdentityPacket(getBroadcastAddresses());
}