We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7fd5066 commit 24dc8eaCopy full SHA for 24dc8ea
STNetTaskQueue/STHTTPNetTaskQueueHandler.m
@@ -179,11 +179,11 @@ - (void)URLSession:(NSURLSession *)session dataTask:(NSURLSessionDataTask *)data
179
180
- (void)URLSession:(NSURLSession *)session task:(NSURLSessionTask *)task didCompleteWithError:(NSError *)error
181
{
182
- NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *)task.response;
183
- if (!httpResponse) { // NSURLSessionTask is cancelled
+ if (error && error.code == NSURLErrorCancelled) {
184
return;
185
}
186
+ NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *)task.response;
187
NSData *data = [NSData dataWithData:_data];
188
if (httpResponse.statusCode >= 200 && httpResponse.statusCode < 300) {
189
id responseObj = nil;
0 commit comments