diff --git a/AFNetworking/AFURLRequestSerialization.m b/AFNetworking/AFURLRequestSerialization.m index 68c2c2d7be..15bb02d2d2 100644 --- a/AFNetworking/AFURLRequestSerialization.m +++ b/AFNetworking/AFURLRequestSerialization.m @@ -312,7 +312,7 @@ - (NSDictionary *)HTTPRequestHeaders { - (void)setValue:(NSString *)value forHTTPHeaderField:(NSString *)field { - dispatch_barrier_async(self.requestHeaderModificationQueue, ^{ + dispatch_barrier_sync(self.requestHeaderModificationQueue, ^{ [self.mutableHTTPRequestHeaders setValue:value forKey:field]; }); }