From d93ee39e295222a8cfa19d5b684fe7eaea7fbcb4 Mon Sep 17 00:00:00 2001 From: Piotr Tobolski Date: Tue, 5 Oct 2021 17:39:06 +0200 Subject: [PATCH] Fix deadlock on first app launch (#1009) --- Segment/Internal/SEGIntegrationsManager.m | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Segment/Internal/SEGIntegrationsManager.m b/Segment/Internal/SEGIntegrationsManager.m index a305cb724..ea550b630 100644 --- a/Segment/Internal/SEGIntegrationsManager.m +++ b/Segment/Internal/SEGIntegrationsManager.m @@ -156,7 +156,9 @@ - (NSString *)cachedAnonymousId - (void)onAppForeground:(NSNotification *)note { - [self refreshSettings]; + seg_dispatch_specific_async(_serialQueue, ^{ + [self refreshSettings]; + }); } - (void)handleAppStateNotification:(NSString *)notificationName