diff options
author | NicoleYarroch <nicole@livio.io> | 2020-07-13 11:08:55 -0400 |
---|---|---|
committer | NicoleYarroch <nicole@livio.io> | 2020-07-13 11:08:55 -0400 |
commit | 06bc7a3e13ec43b5dbc302014382d27c68b68a9e (patch) | |
tree | c856b01dd41d484727eaba687769d4c2c17f6e9f | |
parent | 203f2f26bfc1c93ee00587283f8d703188d1280d (diff) | |
download | sdl_ios-06bc7a3e13ec43b5dbc302014382d27c68b68a9e.tar.gz |
Serialized access to subscriptionStatus
Signed-off-by: NicoleYarroch <nicole@livio.io>
-rw-r--r-- | SmartDeviceLink/SDLSystemCapabilityManager.m | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/SmartDeviceLink/SDLSystemCapabilityManager.m b/SmartDeviceLink/SDLSystemCapabilityManager.m index 54aca24a5..2836ac3c4 100644 --- a/SmartDeviceLink/SDLSystemCapabilityManager.m +++ b/SmartDeviceLink/SDLSystemCapabilityManager.m @@ -387,7 +387,9 @@ typedef NSString * SDLServiceID; SDLLogD(@"GetSystemCapability response succeeded, type: %@, response: %@", type, getSystemCapabilityResponse); if (![weakself.subscriptionStatus[type] isEqualToNumber:subscribe] && weakself.supportsSubscriptions) { - weakself.subscriptionStatus[type] = subscribe; + [self sdl_runSyncOnQueue:^{ + weakself.subscriptionStatus[type] = subscribe; + }]; } [weakself sdl_saveSystemCapability:getSystemCapabilityResponse.systemCapability error:error completionHandler:handler]; |