Skip to content

Commit c7a9f9d

Browse files
Fix the iOS network race when accessing sessions (#1200)
Make sure that access to urlSessions variable is synchronized. Resolves: OLPSUP-14072 Signed-off-by: Mykhailo Kuchma <[email protected]>
1 parent 3e868e3 commit c7a9f9d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

olp-cpp-sdk-core/src/http/ios/OLPHttpClient.mm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,8 +111,8 @@ - (OLPHttpTask*)createTaskWithProxy:
111111
andURLSession:session
112112
andId:identifier];
113113

114-
self.urlSessions[@(identifier)] = session;
115114
@synchronized(self.tasks) {
115+
self.urlSessions[@(identifier)] = session;
116116
self.tasks[@(identifier)] = task;
117117
}
118118

0 commit comments

Comments
 (0)