mirror of
https://github.com/google/santa.git
synced 2026-04-24 03:00:12 -04:00
santactl/sync: When rejecting a redirect, cancel the task to avoid hanging the task until timeout
This commit is contained in:
@@ -112,6 +112,8 @@
|
||||
newRequest:(NSURLRequest *)request
|
||||
completionHandler:(void (^)(NSURLRequest *))completionHandler {
|
||||
if (self.refusesRedirects) {
|
||||
LOGD(@"Rejected redirection to: %@", request.URL);
|
||||
[task cancel]; // without this, the connection hangs until timeout!?!
|
||||
completionHandler(NULL);
|
||||
} else {
|
||||
completionHandler(request);
|
||||
|
||||
Reference in New Issue
Block a user