Support multiple retries for getUserProfilePhotos.
This commit is contained in:
parent
1153e5464d
commit
56a93292bb
@ -16201,7 +16201,7 @@ void ContactsManager::on_get_user_profile_photos(UserId user_id, Result<Unit> &&
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (request_index == 0) {
|
if (request_index == 0 && ++request.retry_count == 3) {
|
||||||
request.promise.set_error(Status::Error(500, "Failed to get profile photos"));
|
request.promise.set_error(Status::Error(500, "Failed to get profile photos"));
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
@ -1083,6 +1083,7 @@ class ContactsManager final : public Actor {
|
|||||||
struct PendingGetPhotoRequest {
|
struct PendingGetPhotoRequest {
|
||||||
int32 offset = 0;
|
int32 offset = 0;
|
||||||
int32 limit = 0;
|
int32 limit = 0;
|
||||||
|
int32 retry_count = 0;
|
||||||
Promise<td_api::object_ptr<td_api::chatPhotos>> promise;
|
Promise<td_api::object_ptr<td_api::chatPhotos>> promise;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user