Commit Graph

68 Commits

Author SHA1 Message Date
levlam
36e95649cc Make AuthData the last field of Session. 2024-02-27 13:51:39 +03:00
levlam
d963044eb9 Update copyright year. 2024-01-01 03:07:21 +03:00
levlam
66757e2511 Improve field names. 2023-10-23 14:10:39 +03:00
levlam
8c10e893c0 Remove unused functions from SessionConnection::Callback. 2023-10-23 13:08:45 +03:00
levlam
b44e2ea3fc Add strictly-typed class mtproto::MessageId. 2023-09-21 17:52:33 +03:00
levlam
ba0d2408f2 Improve handling of new_session_created. 2023-09-01 16:40:19 +03:00
levlam
55e5b2395e Mark sent_at_ as const. 2023-09-01 16:13:00 +03:00
levlam
5ce5ef6234 Save all state flags to ack_state_. 2023-09-01 16:11:21 +03:00
levlam
53b48b4ee8 Improve Session::Query field names. 2023-08-31 00:47:39 +03:00
levlam
cb7088394e Call Session::loop with send_closure_later to unify stack traces. 2023-07-20 19:12:59 +03:00
levlam
723d09ddee Reduce refresh margin for persistent temp auth keys to speed up recover when the old key reregisters after auth.dropTempAuthKeys. 2023-07-17 19:21:18 +03:00
levlam
c9f83caf9f Reset server time difference after a "MessageId is too high" error. 2023-05-14 21:58:54 +03:00
levlam
2325c5041b Collect statistics about received updates. 2023-01-25 17:48:04 +03:00
levlam
758ced943e Don't use Time::now_cached in Session. 2023-01-19 12:27:23 +03:00
levlam
c508e54a49 Improve message_id variable names in Session. 2023-01-15 23:27:58 +03:00
levlam
052d5e120b Improve some mixed-case spelling. 2023-01-15 11:25:54 +03:00
levlam
fb935a8de2 Reduce ping timeout in primary non-main-DC connections. 2023-01-15 00:25:22 +03:00
levlam
973df16c88 Improve logging. 2023-01-14 23:08:50 +03:00
levlam
62040c8d8e Fix check for use_pfs. 2023-01-03 15:06:12 +03:00
levlam
cf1984844b Update copyright year. 2023-01-01 00:28:08 +03:00
levlam
148ded0620 Disable ConfigRecoverer if there are a lot of pending auth keys. 2022-08-10 17:03:38 +03:00
levlam
32bac7bd24 Move Promise to tdutils. 2022-06-27 13:30:18 +03:00
Arseny Smirnov
0450b05757 Session: improve key immunity condition 2022-05-03 16:33:09 +04:00
levlam
1f38124861 Use FlatHashSet. 2022-03-11 21:38:48 +03:00
levlam
bcc2adeb47 Fix includes and formatting. 2022-02-08 00:04:34 +03:00
Arseny Smirnov
86bceb2972 td: replace most of std::unordered_map usages to td::FlatHashMap 2022-02-07 21:21:31 +01:00
levlam
8085779cdc Update copyright year. 2022-01-01 03:35:39 +03:00
levlam
8d7bda00a5 Set connection online flag while logging out. 2021-12-02 15:10:51 +03:00
levlam
0c554fbe04 Unify Session::ConnectionInfo field name style. 2021-11-22 14:36:59 +03:00
levlam
21a7d147f5 Ignore 401 from non-main sessions. 2021-11-22 11:52:09 +03:00
levlam
b731414d42 Init some fields just in case. 2021-11-11 17:39:09 +03:00
levlam
db7aa28bdf A lot more minor improvements. 2021-10-19 18:11:16 +03:00
levlam
74315e2e60 Add mtproto::ConnectionManager. 2021-09-16 19:09:39 +03:00
levlam
2062daf9cd Don't wrap updates in NetQuery. 2021-09-10 17:32:39 +03:00
levlam
edfdcc0170 Remove default on_server_salt_updated implementation. 2021-09-10 16:45:39 +03:00
levlam
55e69f65af Add separate on_update callback. 2021-09-10 16:31:04 +03:00
levlam
40cb97841a Pass error message as string. 2021-07-26 19:58:31 +03:00
levlam
40c5d47717 Make inherited classes final if possible. 2021-07-04 05:58:54 +03:00
levlam
edfa5d1d98 Use final instead of override. 2021-07-03 23:51:36 +03:00
levlam
a78fe2dfe5 Don't drop recently valid auth keys. 2021-04-13 16:52:41 +03:00
levlam
52c1da0a70 Update copyright year. 2021-01-01 15:57:46 +03:00
levlam
90ee4bd63c Minor fixes.
GitOrigin-RevId: ef4e2cfe4f198caec26daf04423eb26afedde5bb
2020-09-24 19:15:42 +03:00
Arseny Smirnov
89fad4fdb9 Session::PriorityQueue: minor simplification
GitOrigin-RevId: f0baab28bb95afef247e4ad0c291222be6d105c5
2020-08-18 18:37:10 +03:00
Arseny Smirnov
1f9529520f NetQuery: support priority
GitOrigin-RevId: 84290ffa7689364f74140c5b951b95ea4792b68d
2020-08-17 16:13:18 +03:00
Arseny Smirnov
5a08290ae0 Session: use MAX_INFLIGHT_QUERIES to limit count of simultaneously sent queries
GitOrigin-RevId: c9c64de982c099b95c6c4bd31d28369f4315f81b
2020-07-31 20:19:18 +03:00
levlam
63f167ac35 Better field names,
GitOrigin-RevId: 93d307c55f9801d78fa68413cbbf238925a351b1
2020-01-08 01:27:12 +03:00
Arseny Smirnov
890855a4f0 Validate and drop invalid main authorization key
GitOrigin-RevId: 5f5a0baf4fc55b629b6e0534c475f6236cc72506
2020-01-07 15:42:04 +03:00
levlam
80c35676a2 Update copyright year.
GitOrigin-RevId: 09afb551b6e637dc69739fa735b0051a38b9e14c
2020-01-01 04:23:48 +03:00
levlam
4ce3005081 QR code authentication fixes.
GitOrigin-RevId: 29108234fa8afc589ac7248ad1fdc92ec1d0ffaf
2019-12-18 03:47:51 +03:00
levlam
34fcde6827 Minor fixes.
GitOrigin-RevId: a5d8a4b0b9b9c4e858d7a9a7403bef0de7e009e0
2019-05-22 21:17:24 +03:00