From c9003f537dc8966d178c61740c1669e768e9cb7b Mon Sep 17 00:00:00 2001 From: Macbook Date: Tue, 24 Dec 2024 23:05:27 +0700 Subject: [PATCH] fixbug QTTimeer --- client/platforms/ios/ios_controller.mm | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/client/platforms/ios/ios_controller.mm b/client/platforms/ios/ios_controller.mm index 10056d62..e81f5ac7 100644 --- a/client/platforms/ios/ios_controller.mm +++ b/client/platforms/ios/ios_controller.mm @@ -874,6 +874,12 @@ void IosController::requestInetAccess() { void IosController::stopForHandshake() { if (m_handshakeTimer) { + if (QThread::currentThread() != m_handshakeTimer->thread()) { + QMetaObject::invokeMethod(m_handshakeTimer, "stop", Qt::QueuedConnection); + QMetaObject::invokeMethod(m_handshakeTimer, "deleteLater", Qt::QueuedConnection); + m_handshakeTimer = nullptr; + return; + } if (m_handshakeTimer->isActive()) { m_handshakeTimer->stop(); }