diff --git a/libnymea/integrations/browseractioninfo.cpp b/libnymea/integrations/browseractioninfo.cpp index 31483956..6461a678 100644 --- a/libnymea/integrations/browseractioninfo.cpp +++ b/libnymea/integrations/browseractioninfo.cpp @@ -46,7 +46,9 @@ BrowserActionInfo::BrowserActionInfo(Thing *thing, ThingManager *thingManager, c if (timeout > 0) { QTimer::singleShot(timeout, this, [this] { emit aborted(); - finish(Thing::ThingErrorTimeout); + if (!m_finished) { + finish(Thing::ThingErrorTimeout); + } }); } } diff --git a/libnymea/integrations/browseresult.cpp b/libnymea/integrations/browseresult.cpp index 229bf83c..dbcce180 100644 --- a/libnymea/integrations/browseresult.cpp +++ b/libnymea/integrations/browseresult.cpp @@ -47,7 +47,9 @@ BrowseResult::BrowseResult(Thing *thing, ThingManager *thingManager, const QStri if (timeout > 0) { QTimer::singleShot(timeout, this, [this] { emit aborted(); - finish(Thing::ThingErrorTimeout); + if (!m_finished) { + finish(Thing::ThingErrorTimeout); + } }); } } diff --git a/libnymea/integrations/browseritemactioninfo.cpp b/libnymea/integrations/browseritemactioninfo.cpp index a4b3de2c..ead4910e 100644 --- a/libnymea/integrations/browseritemactioninfo.cpp +++ b/libnymea/integrations/browseritemactioninfo.cpp @@ -46,7 +46,9 @@ BrowserItemActionInfo::BrowserItemActionInfo(Thing *thing, ThingManager *thingMa if (timeout > 0) { QTimer::singleShot(timeout, this, [this] { emit aborted(); - finish(Thing::ThingErrorTimeout); + if (!m_finished) { + finish(Thing::ThingErrorTimeout); + } }); } } diff --git a/libnymea/integrations/browseritemresult.cpp b/libnymea/integrations/browseritemresult.cpp index 5891eb0e..642f21c7 100644 --- a/libnymea/integrations/browseritemresult.cpp +++ b/libnymea/integrations/browseritemresult.cpp @@ -47,7 +47,9 @@ BrowserItemResult::BrowserItemResult(Thing *thing, ThingManager *thingManager, c if (timeout > 0) { QTimer::singleShot(timeout, this, [this] { emit aborted(); - finish(Thing::ThingErrorTimeout); + if (!m_finished) { + finish(Thing::ThingErrorTimeout); + } }); } } diff --git a/libnymea/integrations/thingactioninfo.cpp b/libnymea/integrations/thingactioninfo.cpp index 92669e01..665c822e 100644 --- a/libnymea/integrations/thingactioninfo.cpp +++ b/libnymea/integrations/thingactioninfo.cpp @@ -47,7 +47,9 @@ ThingActionInfo::ThingActionInfo(Thing *thing, const Action &action, ThingManage if (timeout > 0) { QTimer::singleShot(timeout, this, [this] { emit aborted(); - finish(Thing::ThingErrorTimeout); + if (!m_finished) { + finish(Thing::ThingErrorTimeout); + } }); } } diff --git a/libnymea/integrations/thingdiscoveryinfo.cpp b/libnymea/integrations/thingdiscoveryinfo.cpp index e8b1067f..14aa8e0d 100644 --- a/libnymea/integrations/thingdiscoveryinfo.cpp +++ b/libnymea/integrations/thingdiscoveryinfo.cpp @@ -46,7 +46,9 @@ ThingDiscoveryInfo::ThingDiscoveryInfo(const ThingClassId &thingClassId, const P if (timeout > 0) { QTimer::singleShot(timeout, this, [this] { emit aborted(); - finish(Thing::ThingErrorTimeout); + if (!m_finished) { + finish(Thing::ThingErrorTimeout); + } }); } } diff --git a/libnymea/integrations/thingpairinginfo.cpp b/libnymea/integrations/thingpairinginfo.cpp index c377f411..eaa8251a 100644 --- a/libnymea/integrations/thingpairinginfo.cpp +++ b/libnymea/integrations/thingpairinginfo.cpp @@ -49,7 +49,9 @@ ThingPairingInfo::ThingPairingInfo(const PairingTransactionId &pairingTransactio if (timeout > 0) { QTimer::singleShot(timeout, this, [this] { emit aborted(); - finish(Thing::ThingErrorTimeout); + if (!m_finished) { + finish(Thing::ThingErrorTimeout); + } }); } } diff --git a/libnymea/integrations/thingsetupinfo.cpp b/libnymea/integrations/thingsetupinfo.cpp index cebb3bf9..3599fa7e 100644 --- a/libnymea/integrations/thingsetupinfo.cpp +++ b/libnymea/integrations/thingsetupinfo.cpp @@ -47,7 +47,9 @@ ThingSetupInfo::ThingSetupInfo(Thing *thing, ThingManager *thingManager, quint32 if (timeout > 0) { QTimer::singleShot(timeout, this, [this] { emit aborted(); - finish(Thing::ThingErrorTimeout); + if (!m_finished) { + finish(Thing::ThingErrorTimeout); + } }); } }