Adding locking to AFURLConnectionOperation -setInputStream:
This commit is contained in:
parent
2868b069cd
commit
e61275110b
1 changed files with 2 additions and 0 deletions
|
|
@ -239,9 +239,11 @@ static inline BOOL AFStateTransitionIsValid(AFOperationState fromState, AFOperat
|
|||
}
|
||||
|
||||
- (void)setInputStream:(NSInputStream *)inputStream {
|
||||
[self.lock lock];
|
||||
NSMutableURLRequest *mutableRequest = [[self.request mutableCopy] autorelease];
|
||||
mutableRequest.HTTPBodyStream = inputStream;
|
||||
self.request = mutableRequest;
|
||||
[self.lock unlock];
|
||||
}
|
||||
|
||||
#if __IPHONE_OS_VERSION_MIN_REQUIRED
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue