Skip to content

Commit

Permalink
Removing excess whitespace
Browse files Browse the repository at this point in the history
  • Loading branch information
mattt committed Feb 29, 2012
1 parent ec8daf2 commit 51e1798
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions AFNetworking/AFURLConnectionOperation.m
Expand Up @@ -345,21 +345,17 @@ - (void)cancel {
// Cancel the connection on the thread it runs on to prevent race conditions
[self performSelector:@selector(cancelConnection) onThread:[[self class] networkRequestThread] withObject:nil waitUntilDone:NO modes:[self.runLoopModes allObjects]];
}

[self.lock unlock];
}

- (void)cancelConnection {


if (self.connection) {
[self.connection cancel];

// Manually send this delegate message since `[self.connection cancel]` causes the connection to never send another message to its delegate
NSDictionary *userInfo = [NSDictionary dictionaryWithObject:[self.request URL] forKey:NSURLErrorFailingURLErrorKey];
[self performSelector:@selector(connection:didFailWithError:) withObject:self.connection withObject:[NSError errorWithDomain:NSURLErrorDomain code:NSURLErrorCancelled userInfo:userInfo]];
}

}

#pragma mark - NSURLConnectionDelegate
Expand Down

0 comments on commit 51e1798

Please sign in to comment.