Commit graph

173 commits

Author SHA1 Message Date
wulan17
1b3f0933c7
Pyrofork: Update Copyright headers
Signed-off-by: wulan17 <wulan17@nusantararom.org>
2024-02-07 20:25:08 +07:00
wulan17
5bb4d936cc
PyroFork: set STORED_MSG_IDS_MAX_SIZE to 500
Signed-off-by: wulan17 <wulan17@nusantararom.org>
2023-08-18 16:47:53 +07:00
wulan17
9e82bd0b57
Pyrofork: Add alt_port parameter to Client
Signed-off-by: wulan17 <wulan17@nusantararom.org>
2023-08-18 03:30:28 +07:00
mrmissx
5ba8cc48fc
fix: try to handle startup BadMsgNotification #11
Retry to generate a new msg_id to send before raising BadMsgNotification.

Signed-off-by: wulan17 <wulan17@nusantararom.org>
2023-08-18 03:30:27 +07:00
Dan
2ff67c72aa Move the CDN DC IPv6 to the correct mapping 2023-04-30 20:23:42 +02:00
Dan
e24d5b1cf5 Add RSA public keys & IP addresses for some CDN DCs 2023-04-30 19:54:39 +02:00
Dan
245b7e653d Tweak Session timeouts 2023-01-12 18:25:42 +01:00
Dan
d53e1c235b Lower the logging level of some log calls 2023-01-09 15:19:55 +01:00
Dan
6752af8796 Add error messages for transport errors 2022-12-31 19:01:42 +01:00
Dan
cf1e31c413 Apply security checks to each message in the container 2022-12-29 23:33:58 +01:00
Dan
d890e5346c Clear stored_msg_ids on session stop 2022-12-28 17:44:02 +01:00
Dan
1daa05a35c Raise and handle send errors in order to immediately act upon 2022-12-28 00:21:05 +01:00
Dan
5ca422b314 Create a future result before sending its request 2022-12-28 00:19:28 +01:00
Dan
9bf742abc0 Introduce back some previously reverted changes 2022-12-27 13:40:42 +01:00
Dan
bff583ed75 Revert some of the latest changes 2022-12-26 22:26:55 +01:00
Dan
235dde2251 Update exception message 2022-12-26 20:11:58 +01:00
Dan
01cd8bb57f Optimize log calls 2022-12-26 16:38:12 +01:00
Dan
d298c62c6d Update session.py 2022-12-26 16:34:49 +01:00
Dan
ce8c242eb4 Revert to triggering a reconnection when skipping invalid packets 2022-12-25 15:14:12 +01:00
Dan
b23e34494e Add messages for mismatched checks 2022-12-25 15:08:02 +01:00
Dan
ae028ab4b6 Switch back to local system time synchronization
perf_counter will stop counting when the system goes to sleep, causing
the generation of invalid message ids after waking up which in turn put
the client into a never ending reconnecting loop due to check mismatches
caused by the time not being synced anymore. It's also unclear whether
perf_counter stays in sync during long runs.
2022-12-25 14:55:40 +01:00
Dan
4c32a15cfd Remove unneeded threading.Lock 2022-12-25 10:30:56 +01:00
Dan
84d60b56b3 Switch to non-blocking sockets & use a send queue 2022-12-24 16:15:07 +01:00
Dan
b59dcd1615 Do not trigger a reconnection when skipping invalid packets 2022-06-20 09:32:10 +02:00
Dan
7c3c0565b4 Fix wrapped function invocations 2022-05-14 17:29:11 +02:00
Dan
4e1b54288b Fix Client.name usage 2022-04-24 11:56:07 +02:00
Dan
124bcb4db7 Remove API key requirement for existing sessions 2022-04-24 11:56:07 +02:00
Dan
0e3c2e4412 Rename RPCError.x to RPCError.value 2022-04-24 11:56:07 +02:00
Dan
78efb04b40 Rename Client.send to Client.invoke 2022-04-24 11:56:07 +02:00
Dan
dc6c816c80 Revert some of the last changes 2022-02-10 06:44:42 +01:00
Dan
5889c67fb5 Initialize session on reconnection 2022-02-10 05:34:21 +01:00
Stark Programmer
5d155b896c
Add missing await keyword (#898) 2022-02-10 02:22:43 +01:00
Dan
462e5d11a5 Improve stability in case of connection failures 2022-02-10 01:05:36 +01:00
Dan
3a911956b0 Update message for automatic sleeps 2022-01-31 20:45:04 +01:00
Dan
6f9e77bc2c Do not handle messages with a pending ack 2022-01-31 20:42:44 +01:00
Dan
1162e89f26 Better handling of expiring server salts 2022-01-20 09:43:29 +01:00
Dan
626a1bd938 Update copyright year 2022-01-07 10:23:45 +01:00
Dan
8c8288412f Various improvements 2022-01-07 10:18:51 +01:00
Dan
a3fab6af4b Merge branch 'mtproto-checks'
# Conflicts:
#	pyrogram/errors/__init__.py
#	pyrogram/session/session.py
2021-12-24 16:28:29 +01:00
Dan
56e7e11037 Use a specialized exception for handling BadMsgNotification 2021-12-22 14:01:05 +01:00
Dan
8aa358129c Use specialized exceptions for handling security checks 2021-12-16 21:38:24 +01:00
Dan
ed9c7e4694 Simplify the error handling a bit 2021-12-15 19:26:54 +01:00
Dan
2a1af2b8e9 Close and reestablish the TCP connection in case of mismatch 2021-12-15 16:02:39 +01:00
Dan
cd027b8c1c Implement missing MTProto checks 2021-12-15 13:18:13 +01:00
Dan
54350dc943 Merge branch 'handle-503-timeout' 2021-04-26 15:32:07 +02:00
Dan
3c81006b40 Merge branch 'media-servers' 2021-04-26 15:31:08 +02:00
Dan
c5624c639b Cleaner error message 2021-04-15 12:17:25 +02:00
Dan
0c814e9e5e Add support for media DC IPs 2021-04-13 15:53:53 +02:00
Dan
70ae12eb77 Handle ServiceUnavailable errors
#664
2021-04-12 09:21:20 +02:00
Dan
a48d27f501 Always run crypto-related functions in the dedicated thread 2021-01-02 18:45:43 +01:00