mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-05 06:33:57 +02:00
Fix update request timeout.
This commit is contained in:
parent
266102df2f
commit
688275ea81
1 changed files with 2 additions and 1 deletions
|
@ -270,8 +270,9 @@ void ApiWrap::requestTermsUpdate() {
|
||||||
_termsUpdateRequestId = 0;
|
_termsUpdateRequestId = 0;
|
||||||
|
|
||||||
const auto requestNext = [&](auto &&data) {
|
const auto requestNext = [&](auto &&data) {
|
||||||
|
const auto timeout = (data.vexpires.v - unixtime());
|
||||||
_termsUpdateSendAt = getms(true) + snap(
|
_termsUpdateSendAt = getms(true) + snap(
|
||||||
TimeMs(data.vexpires.v - unixtime()),
|
timeout * TimeMs(1000),
|
||||||
kTermsUpdateTimeoutMin,
|
kTermsUpdateTimeoutMin,
|
||||||
kTermsUpdateTimeoutMax);
|
kTermsUpdateTimeoutMax);
|
||||||
requestTermsUpdate();
|
requestTermsUpdate();
|
||||||
|
|
Loading…
Add table
Reference in a new issue