diff --git a/SDWebImage/SDWebImageDownloaderOperation.m b/SDWebImage/SDWebImageDownloaderOperation.m index c9275ea0..55940280 100644 --- a/SDWebImage/SDWebImageDownloaderOperation.m +++ b/SDWebImage/SDWebImageDownloaderOperation.m @@ -181,16 +181,11 @@ typedef NSMutableDictionary SDCallbacksDictionary; } if (self.dataTask) { -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wunguarded-availability" - if ([self.dataTask respondsToSelector:@selector(setPriority:)]) { - if (self.options & SDWebImageDownloaderHighPriority) { - self.dataTask.priority = NSURLSessionTaskPriorityHigh; - } else if (self.options & SDWebImageDownloaderLowPriority) { - self.dataTask.priority = NSURLSessionTaskPriorityLow; - } + if (self.options & SDWebImageDownloaderHighPriority) { + self.dataTask.priority = NSURLSessionTaskPriorityHigh; + } else if (self.options & SDWebImageDownloaderLowPriority) { + self.dataTask.priority = NSURLSessionTaskPriorityLow; } -#pragma clang diagnostic pop [self.dataTask resume]; for (SDWebImageDownloaderProgressBlock progressBlock in [self callbacksForKey:kProgressCallbackKey]) { progressBlock(0, NSURLResponseUnknownLength, self.request.URL);