mirror of
https://github.com/tiennm99/mtprotoproxy.git
synced 2026-10-12 18:16:33 +00:00
replace infinite loop with timeout with while loop, when the client is bad
This commit is contained in:
1 parent
2e86308e90
commit
7eea7d3201
1 file changed
+2
-2
+2
-2
@@ -496,9 +496,9 @@ async def handle_handshake(reader, writer):
|
||||
writer = CryptoWrappedStreamWriter(writer, encryptor)
|
||||
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
|
||||
await reader.read(READ_BUF_SIZE)
|
||||
pass
|
||||
|
||||
return False
|
||||
|
||||
|
||||
Reference in new issue
Block a user