From 8a4bc771251ed55a737674355b410b5a3386c7a1 Mon Sep 17 00:00:00 2001 From: Alexander Bersenev Date: Fri, 16 Aug 2019 16:23:14 +0500 Subject: [PATCH] make default client handshake timeout random --- mtprotoproxy.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mtprotoproxy.py b/mtprotoproxy.py index 2e55a26..c763848 100755 --- a/mtprotoproxy.py +++ b/mtprotoproxy.py @@ -176,7 +176,7 @@ def init_config(): conf_dict.setdefault("CLIENT_KEEPALIVE", 10*60) # drop client after this timeout if the handshake fail - conf_dict.setdefault("CLIENT_HANDSHAKE_TIMEOUT", 10) + conf_dict.setdefault("CLIENT_HANDSHAKE_TIMEOUT", random.randrange(5, 15)) # if client doesn't confirm data for this number of seconds, it is dropped conf_dict.setdefault("CLIENT_ACK_TIMEOUT", 5*60)