diff --git a/olp-cpp-sdk-core/src/http/ios/OLPHttpTask.mm b/olp-cpp-sdk-core/src/http/ios/OLPHttpTask.mm index bf26b8948..0bb9fa985 100644 --- a/olp-cpp-sdk-core/src/http/ios/OLPHttpTask.mm +++ b/olp-cpp-sdk-core/src/http/ios/OLPHttpTask.mm @@ -98,7 +98,9 @@ - (OLPHttpTaskStatus)restart { } if (_dataTask) { - _httpClient.toIgnoreResponse[_dataTask.taskDescription] = _dataTask; + @synchronized(_httpClient.toIgnoreResponse) { + _httpClient.toIgnoreResponse[_dataTask.taskDescription] = _dataTask; + } [_dataTask cancel]; _dataTask = nil; }