summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTimur Pocheptsov <timur.pocheptsov@qt.io>2021-12-19 16:42:19 +0100
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2021-12-20 13:01:36 +0000
commitf928bd4415aaa300929d336e26c42de8dca2fdb5 (patch)
treef0d6f31d949ae8d977b58ebafebf6992043220fa
parent08ddb3aa354dbbe2f5c757cc14b9787dac7acc8e (diff)
IOBluetooth (device scan) - reduce the manual timeout
Normally, we set it to 15 s. when creating inquiry instance, since Monterey our 15 s. are ignored and we had a timer to stop the scan in 30 s. Now that tests are runing on CI a painfully long timeout is not needed. Make it 17 s. in case IOBluetooth will be able to stop in 15. Change-Id: I8e07c2a3f3c46bed3780f3287e637b5324660305 Reviewed-by: Juha Vuolle <juha.vuolle@insta.fi> (cherry picked from commit 24674633ecebc85f09fe8bd5babeba9abe0ee3e0) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
-rw-r--r--src/bluetooth/darwin/btdeviceinquiry.mm3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/bluetooth/darwin/btdeviceinquiry.mm b/src/bluetooth/darwin/btdeviceinquiry.mm
index db8c778b..f3e19d88 100644
--- a/src/bluetooth/darwin/btdeviceinquiry.mm
+++ b/src/bluetooth/darwin/btdeviceinquiry.mm
@@ -128,7 +128,8 @@ const uint8_t IOBlueoothInquiryLengthS = 15;
});
watchDog->setSingleShot(true);
- watchDog->setInterval(IOBlueoothInquiryLengthS * 2 * 1000); // Let's make it twice as long.
+ // +2 to give IOBluetooth a chance to stop it first:
+ watchDog->setInterval((IOBlueoothInquiryLengthS + 2) * 1000);
watchDog->start();
}