mirror of
https://github.com/alexbers/mtprotoproxy.git
synced 2026-03-14 07:13:09 +00:00
replace infinite loop with timeout with while loop, when the client is bad
This commit is contained in:
@@ -496,9 +496,9 @@ async def handle_handshake(reader, writer):
|
|||||||
writer = CryptoWrappedStreamWriter(writer, encryptor)
|
writer = CryptoWrappedStreamWriter(writer, encryptor)
|
||||||
return reader, writer, proto_tag, user, dc_idx, enc_key + enc_iv
|
return reader, writer, proto_tag, user, dc_idx, enc_key + enc_iv
|
||||||
|
|
||||||
while True:
|
while await reader.read(READ_BUF_SIZE):
|
||||||
# just consume all the data
|
# just consume all the data
|
||||||
await reader.read(READ_BUF_SIZE)
|
pass
|
||||||
|
|
||||||
return False
|
return False
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user