network device monitor: clean up pending ping replies properly during shutdown

This commit is contained in:
Simon Stürz 2023-01-12 15:56:03 +01:00
parent d43b9dc737
commit adf85cc15c

View File

@ -615,8 +615,11 @@ void NetworkDeviceDiscoveryImpl::evaluateMonitor(NetworkDeviceMonitorImpl *monit
monitor->setLastConnectionAttempt(QDateTime::currentDateTime());
});
connect(reply, &PingReply::finished, monitor, [=](){
connect(reply, &PingReply::destroyed, monitor, [=](){
monitor->setCurrentPingReply(nullptr);
});
connect(reply, &PingReply::finished, monitor, [=](){
processMonitorPingResult(reply, monitor);
});
}