mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2026-01-28 06:49:37 +00:00
Retry download requests after failure
This commit is contained in:
@@ -119,6 +119,10 @@ class Download: NSObject, MTRequestMessageServiceDelegate {
|
||||
|
||||
request.dependsOnPasswordEntry = false
|
||||
|
||||
request.shouldContinueExecutionWithErrorContext = { errorContext in
|
||||
return true
|
||||
}
|
||||
|
||||
request.completed = { (boxedResponse, timestamp, error) -> () in
|
||||
if let error = error {
|
||||
subscriber.putError(error)
|
||||
@@ -163,6 +167,10 @@ class Download: NSObject, MTRequestMessageServiceDelegate {
|
||||
|
||||
request.dependsOnPasswordEntry = false
|
||||
|
||||
request.shouldContinueExecutionWithErrorContext = { errorContext in
|
||||
return true
|
||||
}
|
||||
|
||||
request.completed = { (boxedResponse, timestamp, error) -> () in
|
||||
if let error = error {
|
||||
subscriber.putError(error)
|
||||
@@ -210,6 +218,10 @@ class Download: NSObject, MTRequestMessageServiceDelegate {
|
||||
|
||||
request.dependsOnPasswordEntry = false
|
||||
|
||||
request.shouldContinueExecutionWithErrorContext = { errorContext in
|
||||
return true
|
||||
}
|
||||
|
||||
request.completed = { (boxedResponse, timestamp, error) -> () in
|
||||
if let error = error {
|
||||
subscriber.putError(error)
|
||||
@@ -253,6 +265,10 @@ class Download: NSObject, MTRequestMessageServiceDelegate {
|
||||
|
||||
request.dependsOnPasswordEntry = false
|
||||
|
||||
request.shouldContinueExecutionWithErrorContext = { errorContext in
|
||||
return true
|
||||
}
|
||||
|
||||
request.completed = { (boxedResponse, timestamp, error) -> () in
|
||||
if let error = error {
|
||||
subscriber.putError(error)
|
||||
@@ -291,6 +307,10 @@ class Download: NSObject, MTRequestMessageServiceDelegate {
|
||||
|
||||
request.dependsOnPasswordEntry = false
|
||||
|
||||
request.shouldContinueExecutionWithErrorContext = { errorContext in
|
||||
return true
|
||||
}
|
||||
|
||||
request.completed = { (boxedResponse, timestamp, error) -> () in
|
||||
if let error = error {
|
||||
subscriber.putError(error)
|
||||
|
||||
Reference in New Issue
Block a user