Skip to content
This repository has been archived by the owner on Jan 17, 2023. It is now read-only.

Commit

Permalink
[Issue #2496] Preventing infinite while loop when outputStream does n…
Browse files Browse the repository at this point in the history
…ot have space available
  • Loading branch information
mattt committed Feb 14, 2015
1 parent 3fc8071 commit 106143e
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions AFNetworking/AFURLConnectionOperation.m
Expand Up @@ -666,11 +666,13 @@ - (void)connection:(NSURLConnection __unused *)connection
}

break;
}

if (self.outputStream.streamError) {
} else {
[self.connection cancel];
[self performSelector:@selector(connection:didFailWithError:) withObject:self.connection withObject:self.outputStream.streamError];

if (self.outputStream.streamError) {
[self performSelector:@selector(connection:didFailWithError:) withObject:self.connection withObject:self.outputStream.streamError];
}

return;
}
}
Expand Down

0 comments on commit 106143e

Please sign in to comment.