mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2025-08-05 03:22:29 +00:00
Set a known buffer size if possible on BinaryWriter()s
This commit is contained in:
@@ -19,7 +19,7 @@ def do_authentication(connection):
|
||||
|
||||
# Step 1 sending: PQ Request
|
||||
nonce = os.urandom(16)
|
||||
with BinaryWriter() as writer:
|
||||
with BinaryWriter(known_length=20) as writer:
|
||||
writer.write_int(0x60469778, signed=False) # Constructor number
|
||||
writer.write(nonce)
|
||||
sender.send(writer.get_bytes())
|
||||
|
Reference in New Issue
Block a user