summaryrefslogtreecommitdiff
path: root/JuickPush
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2021-02-10 19:00:48 +0300
committerGravatar Vitaly Takmazov2021-02-10 19:00:48 +0300
commit2a122f9cddfd1759407bb115edbc9323035124ab (patch)
treeb3b40eec52fbac46c9856c44afc6ab21d994b11d /JuickPush
parent24d28d8aa4383c343e4d832dc5033878218a5d93 (diff)
Use shared URL session in the push extension
Diffstat (limited to 'JuickPush')
-rw-r--r--JuickPush/NotificationService.m2
1 files changed, 1 insertions, 1 deletions
diff --git a/JuickPush/NotificationService.m b/JuickPush/NotificationService.m
index 82dead8..afeec55 100644
--- a/JuickPush/NotificationService.m
+++ b/JuickPush/NotificationService.m
@@ -23,7 +23,7 @@
NSURL *avatarURL = [NSURL URLWithString:request.content.userInfo[@"avatarUrl"]];
- NSURLSession * downloadSession = [NSURLSession sessionWithConfiguration:[NSURLSessionConfiguration defaultSessionConfiguration]];
+ NSURLSession* downloadSession = [NSURLSession sharedSession];
[[downloadSession downloadTaskWithURL:avatarURL completionHandler:^(NSURL * _Nullable location, NSURLResponse * _Nullable response, NSError * _Nullable error) {
if (!error) {