ZaStoGram_desktop/Telegram/SourceFiles/mtproto/session/private
Repository files (latest commit first)
Filename Latest commit message Latest commit date
loop-uh 958d05339b Record that a server told us the time, not that it moved the clock
The clock reference was inferred from the correction being nonzero, which
inverts the warning. base::unixtime::update() returns without applying a
shift smaller than kIgnoreTimeDifference, three seconds - so a machine whose
clock is right keeps a zero shift and looks exactly like one that never heard
from a server. The HTTP correction does not cover for it either: the Date
fetch runs only off a fake TLS failure path, so a client that works never
performs one.

Put together, clock_ref=none would have been logged on every hello of every
healthy user, and stayed silent for the users already off by the three
seconds a relay refuses. A warning everyone sees stops being read, and the
first thing to stop being read is the one case it exists for.

So the flag now records the event it was always meant to record: a server
time arrived. It is raised at all four places one can arrive - three in
receive.cpp, one in the key creator - next to the update call rather than
inside it, because the update is exactly what may decide to do nothing. The
flag lives in the runtime layer as process-wide atomic state; base::unixtime
would be the natural home, but it is a submodule, and its own ValueUpdated
has the same hole on the ignore path.

The guard test now pins both halves: that the reference comes from
ServerTimeReceived(), and that every update call site has a matching mark.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-07-26 14:08:52 +03:00
..
auth.cpp Fix MTProto session split compile 2026-07-08 21:13:28 +03:00
auth_factory.cpp Fix MTProto session compile contracts 2026-07-08 20:51:55 +03:00
auth_factory.h продолжение 2026-07-08 15:39:38 +03:00
connection.cpp Drop the dial concurrency cap the relays disproved 2026-07-26 00:28:06 +03:00
connection_factory.cpp продолжение 2026-07-08 15:39:38 +03:00
connection_factory.h продолжение 2026-07-08 15:39:38 +03:00
message_handler.cpp глубокая перекройка монолитных god файлов 2026-07-08 15:39:27 +03:00
message_handler.h fix 2026-07-08 16:28:12 +03:00
receive.cpp Record that a server told us the time, not that it moved the clock 2026-07-26 14:08:52 +03:00
send.cpp Pace MTProxy dials instead of steering them 2026-07-25 16:58:05 +03:00
session_private.cpp Pace MTProxy dials instead of steering them 2026-07-25 16:58:05 +03:00
session_private.h Declare the diagnostics enums session_private.h names 2026-07-25 22:37:09 +03:00
timings.h fix 2026-07-08 16:28:12 +03:00
transport.cpp Pace MTProxy dials instead of steering them 2026-07-25 16:58:05 +03:00
transport.h Give a paced dial the handshake it was promised 2026-07-25 21:54:05 +03:00