diff --git a/internal/platform/implementation/apple/Mediums/BLE/Tests/GNCFakePeripheral.h b/internal/platform/implementation/apple/Mediums/BLE/Tests/GNCFakePeripheral.h index 866968e8..adf449e6 100644 --- a/internal/platform/implementation/apple/Mediums/BLE/Tests/GNCFakePeripheral.h +++ b/internal/platform/implementation/apple/Mediums/BLE/Tests/GNCFakePeripheral.h @@ -56,7 +56,7 @@ NS_ASSUME_NONNULL_BEGIN @property(nonatomic, nullable, readwrite) NSError *readValueForCharacteristicError; /** Similates a delay in all delegate calls by the specified amount. */ -@property(nonatomic, readwrite) NSTimeInterval delegateDelay; +@property(readwrite) NSTimeInterval delegateDelay; /** * Similates a @c openL2CAPChannelWithPSM: error. diff --git a/internal/platform/implementation/apple/Mediums/BLE/Tests/GNCFakePeripheral.m b/internal/platform/implementation/apple/Mediums/BLE/Tests/GNCFakePeripheral.m index 971977ab..916b6495 100644 --- a/internal/platform/implementation/apple/Mediums/BLE/Tests/GNCFakePeripheral.m +++ b/internal/platform/implementation/apple/Mediums/BLE/Tests/GNCFakePeripheral.m @@ -136,10 +136,11 @@ NS_ASSUME_NONNULL_BEGIN } - (void)delayDelegateUsingBlock:(void (^)())block { - if (_delegateDelay <= 0) { + NSTimeInterval delegateDelay = self.delegateDelay; + if (delegateDelay <= 0) { block(); } else { - dispatch_after(dispatch_time(DISPATCH_TIME_NOW, _delegateDelay * NSEC_PER_SEC), + dispatch_after(dispatch_time(DISPATCH_TIME_NOW, delegateDelay * NSEC_PER_SEC), dispatch_get_global_queue(QOS_CLASS_DEFAULT, 0), ^{ block(); });