summaryrefslogtreecommitdiffstats
path: root/src/bluetooth/osx/osxbtcentralmanager.mm
diff options
context:
space:
mode:
authorQt Forward Merge Bot <qt_forward_merge_bot@qt-project.org>2018-06-26 03:00:50 +0200
committerQt Forward Merge Bot <qt_forward_merge_bot@qt-project.org>2018-06-26 03:00:50 +0200
commit1c76ffaf2cc77162ce8ee23d4604dc9925bef201 (patch)
tree562aa9858361c84a6758b857cffcc3c26b28020b /src/bluetooth/osx/osxbtcentralmanager.mm
parent3e1c520f039484a9ecc5d6aacea5d761a183dc47 (diff)
parentc754e16ceddaf6826d2a74775df8409b3278d5b8 (diff)
Merge remote-tracking branch 'origin/5.11' into dev
Diffstat (limited to 'src/bluetooth/osx/osxbtcentralmanager.mm')
-rw-r--r--src/bluetooth/osx/osxbtcentralmanager.mm8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/bluetooth/osx/osxbtcentralmanager.mm b/src/bluetooth/osx/osxbtcentralmanager.mm
index b56dc0d5..9254bd98 100644
--- a/src/bluetooth/osx/osxbtcentralmanager.mm
+++ b/src/bluetooth/osx/osxbtcentralmanager.mm
@@ -229,6 +229,9 @@ QT_END_NAMESPACE
qCWarning(QT_BT_OSX, "Timeout while reading a descriptor");
[self peripheral:peripheral didUpdateValueForDescriptor:objectUnderWatch error:nsError];
break;
+ case OperationTimeout::characteristicWrite:
+ qCWarning(QT_BT_OSX, "Timeout while writing a characteristic with response");
+ [self peripheral:peripheral didWriteValueForCharacteristic:objectUnderWatch error:nsError];
default:;
}
}
@@ -751,6 +754,7 @@ QT_END_NAMESPACE
return [self performNextRequest];
requestPending = true;
+ [self watchAfter:characteristic timeout:OperationTimeout::characteristicWrite];
[peripheral writeValue:data.data() forCharacteristic:characteristic
type:CBCharacteristicWriteWithResponse];
} else {
@@ -1621,6 +1625,10 @@ QT_END_NAMESPACE
QT_BT_MAC_AUTORELEASEPOOL;
+ if (characteristic != objectUnderWatch)
+ return;
+
+ [self stopWatchdog];
requestPending = false;