From 7cfbe49806e2e0724e42af6ac3898883d68ffa09 Mon Sep 17 00:00:00 2001 From: Esdeath Date: Wed, 18 Jan 2017 07:05:15 -0600 Subject: [PATCH] refine traffic log when redirect enable (#163) --- shadowsocks/tcprelay.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/shadowsocks/tcprelay.py b/shadowsocks/tcprelay.py index da0565c..28eed26 100644 --- a/shadowsocks/tcprelay.py +++ b/shadowsocks/tcprelay.py @@ -313,7 +313,7 @@ class TCPRelayHandler(object): if self._encrypt_correct: if sock == self._remote_sock: self._server.add_transfer_u(self._user, len(data)) - self._update_activity(len(data)) + self._update_activity(len(data)) if data: l = len(data) s = sock.send(data) @@ -847,8 +847,8 @@ class TCPRelayHandler(object): data = self._protocol.server_pre_encrypt(data) data = self._encryptor.encrypt(data) data = self._obfs.server_encode(data) - self._update_activity(len(data)) - self._server.add_transfer_d(self._user, len(data)) + self._server.add_transfer_d(self._user, len(data)) + self._update_activity(len(data)) else: return try: