Commit Graph

593 Commits

Author SHA1 Message Date
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
b9473decc2 Always list actor_id first in lambda capture. 2023-07-11 17:53:43 +03:00
levlam
583f10706a Improve logging on SessionConnection closure. 2023-07-11 13:42:47 +03:00
levlam
a8c1b24318 Improve error messages. 2023-07-05 16:18:45 +03:00
levlam
509dd95882 Allow IPv6 connections on watchOS. 2023-06-16 13:24:21 +03:00
levlam
ee8e2b1481 Avoid expected error logging on watchOS. 2023-06-16 13:08:50 +03:00
levlam
348a209ab7 Fix includes. 2023-05-18 14:33:00 +03:00
levlam
a395337265 Fix session_id type. 2023-05-14 23:00:56 +03:00
levlam
f29774acc6 Fix message_id type. 2023-05-14 22:42:58 +03:00
levlam
c9f83caf9f Reset server time difference after a "MessageId is too high" error. 2023-05-14 21:58:54 +03:00
levlam
37c46b8b12 Increase min_gzipped_size for bots. 2023-05-10 02:06:24 +03:00
levlam
c0911577f7 Use empty name for unused move constructor/assignment parameter. 2023-05-05 13:51:19 +03:00
levlam
fc136f46df Randomize temporary auth key validity time. 2023-05-04 16:00:14 +03:00
levlam
d3ade3d64d Persist temporary keys for main sessions if multiple sessions enabled. 2023-05-04 15:54:21 +03:00
levlam
648c6cd3ef Improve error message. 2023-05-04 15:13:31 +03:00
levlam
b5b0dbe331 Reuse get_auth_key_state. 2023-05-04 14:59:09 +03:00
levlam
14c570f334 Move AuthKeyState to a separate header. 2023-05-04 14:53:07 +03:00
levlam
a05453a2c3 Remove unused variable. 2023-04-26 22:36:06 +03:00
levlam
0c638d3531 Avoid duplicate session wake up time logging. 2023-04-20 17:19:38 +03:00
levlam
1d5d505789 Shuffle built-in datacenter IP addresses. 2023-04-19 10:07:57 +03:00
levlam
fb4d0daa2f Improve names of some variables. 2023-04-03 01:24:43 +03:00
levlam
a9ba8f5a6c Reload promo data sequentially. 2023-03-22 19:52:06 +03:00
levlam
511689877c Improve some log messages. 2023-03-22 19:29:33 +03:00
levlam
4938e6dda7 Fix auth.sentCodeSuccess handling. 2023-03-14 21:45:23 +03:00
levlam
1bd581a66d Use explicit CHECK instead of vector::at. 2023-03-13 18:48:35 +03:00
levlam
32d0433c26 Add "disable_network_statistics" option. 2023-03-13 17:26:23 +03:00
levlam
57a3773fd6 Call connection_online_update after sending service queries. 2023-03-08 18:27:58 +03:00
levlam
e7242b1188 Fix includes. 2023-03-06 20:36:56 +03:00
levlam
d44351bcd7 Improve error message. 2023-03-05 15:51:00 +03:00
levlam
672ef60828 Add td_api::getInternalLink. 2023-03-02 16:21:36 +03:00
levlam
235d68e587 Add LinkManager::get_proxy_link. 2023-03-02 02:41:22 +03:00
levlam
319a3f1c39 Add and use LinkManager::get_t_me_url(). 2023-03-01 23:49:22 +03:00
levlam
22fdc0258b Use "receive"/"have"/"loaded" instead of "got" and other log message improvements. 2023-02-26 14:22:31 +03:00
levlam
47724bd4d8 Improve log message spelling. 2023-02-26 13:08:03 +03:00
levlam
4b538adbdb Remove redundant Slice copy constructor usages. 2023-02-21 11:21:07 +03:00
levlam
a369025cd3 Improve NetQuery debug. 2023-02-20 13:11:39 +03:00
levlam
0adcac246a Use explicit as_mutable_slice to get MutableSlice. 2023-02-02 17:40:47 +03:00
levlam
68d7353350 Add listener nullability checks. 2023-01-30 18:21:57 +03:00
levlam
5a6fb91bd9 Remove unneeded logging. 2023-01-25 17:50:42 +03:00
levlam
2325c5041b Collect statistics about received updates. 2023-01-25 17:48:04 +03:00
levlam
fcb5e068e0 Open main connection before authorization. 2023-01-16 16:43:07 +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
8d8f72a17a Fix some lower-case spelling. 2023-01-15 12:00:26 +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
ab735519a6 Log last used time for auth key. 2023-01-03 12:58:19 +03:00
levlam
903d994799 Improve punctuation. 2023-01-02 15:38:04 +03:00
levlam
cf1984844b Update copyright year. 2023-01-01 00:28:08 +03:00
levlam
af05db3f15 Add td::Hash and use it everywhere instead of unusable std::hash. 2022-11-23 19:37:32 +03:00
levlam
468edb4d61 Use double timestamps in FloodControlStrict. 2022-11-21 21:07:56 +03:00
levlam
b4432a27ba Use autogenerated constant instead of raw constructor number. 2022-11-01 13:22:56 +03:00
levlam
683627a350 Make all operator bool const and nonexcept. 2022-10-09 19:30:18 +03:00
levlam
5a29dcd337 Avoid redundant usages of Status::error(). 2022-10-09 14:15:54 +03:00
levlam
b1f2e553cb Explicitly fail some promises stored in MessagesManager. 2022-10-07 01:28:18 +03:00
levlam
d29c86bb14 Ensure that all network requests are sent and all their responses are processed asynchronously. 2022-10-02 01:53:56 +03:00
levlam
d4d365d31f Remove template ActorOwn::reset. 2022-10-01 16:29:56 +03:00
levlam
be87e4179f Inline ActorOwn::hangup. 2022-10-01 15:58:27 +03:00
levlam
5cb02b8d01 Improve logging for auth key dropping. 2022-09-29 14:50:25 +03:00
levlam
26bd2c71b3 Remove my_id from Global. 2022-08-18 20:21:40 +03:00
levlam
0225f0cab7 Ensure that option values are fetched on launch. 2022-08-18 00:37:19 +03:00
levlam
3318ffdb20 Proxy all option-related requests through G. 2022-08-17 16:11:13 +03:00
levlam
148ded0620 Disable ConfigRecoverer if there are a lot of pending auth keys. 2022-08-10 17:03:38 +03:00
levlam
12d852abc5 Check for close_flag as early as possible. 2022-08-10 13:57:41 +03:00
levlam
898c5c5cf3 Improve error message. 2022-08-02 19:35:35 +03:00
levlam
a817dc8dd0 Fix double increase of total_timeout in NetQueryDelayer and SequenceDispatcher. 2022-08-02 16:51:56 +03:00
levlam
061c4f65d5 Drop context for SemaphoreActor before creation of the actor. 2022-07-20 10:56:48 +03:00
levlam
abc9ed2cd9 Minor fixes. 2022-07-14 18:38:48 +03:00
Arseny Smirnov
bf80c43c05 fix CE 2022-07-14 18:36:46 +04:00
Arseny Smirnov
7ddc3099f6 remove td::this_thread::yield function. usleep_for(1) used instead 2022-07-14 16:15:17 +04:00
levlam
ebebe0300c Move promise_send_closure to PromiseFuture.h. 2022-06-28 14:02:14 +03:00
levlam
32bac7bd24 Move Promise to tdutils. 2022-06-27 13:30:18 +03:00
Arseny Smirnov
8ac019e589 trying to fix bug when active temporary auth key is dropped 2022-06-20 13:18:25 +02:00
levlam
dcb77ce187 Drop SemaphoreActor context. 2022-06-14 16:30:09 +03:00
levlam
782aa6a2ec Minor fixes. 2022-06-14 16:11:38 +03:00
levlam
bfcf52f87c Support MTPROTO_CLUSTER_INVALID error. 2022-06-06 20:36:15 +03:00
levlam
470563c289 Improve log messages. 2022-06-06 17:13:56 +03:00
levlam
1e417ea212 Minor fixes. 2022-06-02 16:19:16 +03:00
levlam
0bc767f943 Pass max_resource_limit as parameter to ResourceManager. 2022-05-20 16:11:31 +03:00
levlam
f93001b0f3 Minor handhake semaphore improvements. 2022-06-11 01:47:00 +03:00
levlam
f95f76c4de Support asynchronous TdDb::open. 2022-06-10 16:44:53 +03:00
Arseny Smirnov
ef3900a853 Use SemaphoreActor for global hanshakes flood limit 2022-06-10 15:17:38 +02:00
levlam
1b5798393d Move FloodControlGlobal to tdutils. 2022-06-09 17:12:59 +03:00
levlam
a30ac1c277 Minor improvements. 2022-06-09 16:38:38 +03:00
Arseny Smirnov
7941672e79 add some kind of global limit for concurrent hanshakes 2022-06-09 11:10:38 +02:00
Arseny Smirnov
852fe4f24b Session: force ack when we received unknown answer 2022-05-03 17:17:36 +04:00
levlam
4b7dab920e Don't update last_success_timestamp_ in Session::on_update with PFS. 2022-05-03 16:06:14 +03:00
Arseny Smirnov
0450b05757 Session: improve key immunity condition 2022-05-03 16:33:09 +04:00
levlam
0d0b641ac6 Log out only if there is main auth key, but it isn't logged in. 2022-05-02 21:41:04 +03:00
levlam
de15cdb1f0 Log out if key check has failed. 2022-05-02 21:17:06 +03:00
levlam
746816e7d7 Add Global::log_out helper. 2022-05-02 20:59:07 +03:00
levlam
d6569d43fd Fix DcAuthManager::check_authorization_is_ok. 2022-05-02 20:44:37 +03:00
levlam
134b7e7d01 Remove unused function. 2022-05-02 20:35:37 +03:00
Arseny Smirnov
449974d425 Double check authorization during start up 2022-05-02 19:34:01 +04:00
levlam
641ee080c1 Improve names of FileType::Secure. 2022-04-25 19:00:40 +03:00
levlam
1a2efed26d Remove NetQuery::set_chain_ids. 2022-04-17 23:21:56 +03:00
levlam
dfa38e059d Improve NetQuery debug. 2022-04-14 12:53:16 +03:00
levlam
f9efb87f7d Improve log message. 2022-03-14 14:08:04 +03:00