From 6354d0e8b742ea250db013cf2385a37e7ad20add Mon Sep 17 00:00:00 2001 From: Wizou <11647984+wiz0u@users.noreply.github.com> Date: Fri, 18 Oct 2024 01:15:45 +0200 Subject: [PATCH] Manager: workaround Updates_GetState returning wrong QTS --- src/UpdateManager.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/UpdateManager.cs b/src/UpdateManager.cs index cfd8053..0a321d1 100644 --- a/src/UpdateManager.cs +++ b/src/UpdateManager.cs @@ -92,7 +92,8 @@ namespace WTelegram private async Task ResyncState(Updates_State state = null) { - state ??= new() { qts = int.MaxValue }; + if (state != null) state.qts = 0; // for some reason Updates_GetState returns an invalid qts, so better consider we have no qts. + else state = new() { qts = int.MaxValue }; await _sem.WaitAsync(); try {