From 3db5a4918f8098fbc44920a720e8665a2d244bb1 Mon Sep 17 00:00:00 2001 From: mengskysama Date: Mon, 26 Oct 2015 16:50:33 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8F=91=E7=8E=B0=E5=A5=BD=E5=A4=9A=E5=9D=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 233 --- shadowsocks/manager.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/shadowsocks/manager.py b/shadowsocks/manager.py index d5d9d12..c069d4d 100644 --- a/shadowsocks/manager.py +++ b/shadowsocks/manager.py @@ -29,7 +29,7 @@ from shadowsocks import common, eventloop, tcprelay, udprelay, asyncdns, shell BUF_SIZE = 1506 -STAT_SEND_LIMIT = 100 +STAT_SEND_LIMIT = 50 class Manager(object): @@ -167,7 +167,9 @@ class Manager(object): if i >= STAT_SEND_LIMIT: send_data(r) r.clear() - send_data(r) + i = 0 + if len(r) > 0: + send_data(r) self._statistics.clear() def _send_control_data(self, data):