From e889f953ff683d1d6af1e5f46015e8490a77be84 Mon Sep 17 00:00:00 2001 From: BreakWa11 Date: Mon, 14 Dec 2015 14:55:39 +0800 Subject: [PATCH] UDP server_transfer_dl += len(post_data) --- shadowsocks/udprelay.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shadowsocks/udprelay.py b/shadowsocks/udprelay.py index c6a69b7..80a30eb 100644 --- a/shadowsocks/udprelay.py +++ b/shadowsocks/udprelay.py @@ -528,7 +528,6 @@ class TCPRelayHandler(object): if not data: self.destroy() return - self._server.server_transfer_dl += len(data) try: recv_data = data beg_pos = 0 @@ -547,6 +546,7 @@ class TCPRelayHandler(object): post_data = self._pack_post_data(CMD_POST, pack_id, data) addr = self.get_local_address() self._write_to_sock(post_data, self._local_sock, addr) + self._server.server_transfer_dl += len(post_data) if pack_id <= DOUBLE_SEND_BEG_IDS: post_data = self._pack_post_data(CMD_POST, pack_id, data) self._write_to_sock(post_data, self._local_sock, addr)