[Issue #323] Close existing outputStream in setOutputStream:
This commit is contained in:
parent
3ee1fefeac
commit
2f79428e34
1 changed files with 5 additions and 1 deletions
|
|
@ -248,7 +248,11 @@ static inline BOOL AFStateTransitionIsValid(AFOperationState fromState, AFOperat
|
|||
- (void)setOutputStream:(NSOutputStream *)outputStream {
|
||||
[self willChangeValueForKey:@"outputStream"];
|
||||
[outputStream retain];
|
||||
[_outputStream release];
|
||||
|
||||
if (_outputStream) {
|
||||
[_outputStream close];
|
||||
[_outputStream release];
|
||||
}
|
||||
_outputStream = outputStream;
|
||||
[self didChangeValueForKey:@"outputStream"];
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue