From 8df6d9db7ee5020c1a54c913a5cb929f51515559 Mon Sep 17 00:00:00 2001 From: John Preston Date: Thu, 4 Apr 2024 17:37:50 +0400 Subject: [PATCH] Don't update server-time too frequently. --- Telegram/SourceFiles/mtproto/session_private.cpp | 6 ++++-- Telegram/lib_base | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/Telegram/SourceFiles/mtproto/session_private.cpp b/Telegram/SourceFiles/mtproto/session_private.cpp index 09f078f87..bdd2b9a83 100644 --- a/Telegram/SourceFiles/mtproto/session_private.cpp +++ b/Telegram/SourceFiles/mtproto/session_private.cpp @@ -1651,7 +1651,9 @@ SessionPrivate::HandleResult SessionPrivate::handleOneReceived( } _sessionSalt = data.vnew_server_salt().v; - correctUnixtimeWithBadLocal(info.serverTime); + + // Don't force time update here. + base::unixtime::update(info.serverTime); if (_bindMsgId) { LOG(("Message Info: bad_server_salt received while binding temp key, restarting.")); @@ -2079,7 +2081,7 @@ void SessionPrivate::correctUnixtimeByFastRequest( locker.unlock(); SyncTimeRequestDuration = duration; - base::unixtime::update(serverTime, true); + base::unixtime::update(serverTime); return; } } diff --git a/Telegram/lib_base b/Telegram/lib_base index beef65fac..3d1ea724a 160000 --- a/Telegram/lib_base +++ b/Telegram/lib_base @@ -1 +1 @@ -Subproject commit beef65fac578a812dade36557f4c666ac3d3ba78 +Subproject commit 3d1ea724a80c3e3a431a88a653d24f4f418eaea8