From accba06b45fe365053eea3d3dbb2122d578d3001 Mon Sep 17 00:00:00 2001 From: Alexander Bersenev Date: Tue, 26 Jun 2018 20:17:52 +0500 Subject: [PATCH] count client stats only for successfull clients --- mtprotoproxy.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mtprotoproxy.py b/mtprotoproxy.py index ba9cef8..e4e6f40 100755 --- a/mtprotoproxy.py +++ b/mtprotoproxy.py @@ -745,8 +745,6 @@ async def handle_client(reader_clt, writer_clt): reader_clt, writer_clt, proto_tag, user, dc_idx, enc_key_and_iv = clt_data - update_stats(user, connects=1) - if not USE_MIDDLE_PROXY: if FAST_MODE: tg_data = await do_direct_handshake(proto_tag, dc_idx, dec_key_and_iv=enc_key_and_iv) @@ -759,6 +757,8 @@ async def handle_client(reader_clt, writer_clt): if not tg_data: return + update_stats(user, connects=1) + reader_tg, writer_tg = tg_data if not USE_MIDDLE_PROXY and FAST_MODE: