mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-11-25 01:22:41 +00:00
Added checking that sessionTask hasn't been added during creation of previous one
This commit is contained in:
parent
7359e2255d
commit
9c20edb310
@ -154,7 +154,11 @@ static ASDN::RecursiveMutex currentRequestsLock;
|
|||||||
if (self.isCancelled) {
|
if (self.isCancelled) {
|
||||||
return nil;
|
return nil;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (self.sessionTask && (self.sessionTask.state == NSURLSessionTaskStateRunning)) {
|
||||||
|
return nil;
|
||||||
|
}
|
||||||
|
|
||||||
self.sessionTask = newTask;
|
self.sessionTask = newTask;
|
||||||
|
|
||||||
return self.sessionTask;
|
return self.sessionTask;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user