From 36e95649cc31b5f12aa7922307367ca603415de2 Mon Sep 17 00:00:00 2001 From: levlam Date: Tue, 27 Feb 2024 13:51:39 +0300 Subject: [PATCH] Make AuthData the last field of Session. --- td/telegram/net/Session.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/td/telegram/net/Session.h b/td/telegram/net/Session.h index 97b0ae9aa..67905a5b4 100644 --- a/td/telegram/net/Session.h +++ b/td/telegram/net/Session.h @@ -171,7 +171,6 @@ class Session final unique_ptr cached_connection_; std::shared_ptr callback_; - mtproto::AuthData auth_data_; bool use_pfs_{false}; bool need_check_main_key_{false}; TempAuthKeyWatchdog::RegisteredAuthKey registered_temp_auth_key_; @@ -197,6 +196,10 @@ class Session final std::array handshake_info_; double wakeup_at_; + + // mtproto::AuthData should be the last field, because it's size is about 32 KB + mtproto::AuthData auth_data_; + void on_handshake_ready(Result> r_handshake); void create_gen_auth_key_actor(HandshakeId handshake_id); void auth_loop(double now);