Browse Source

UDP server_transfer_dl += len(post_data)

dev
BreakWa11 9 years ago
parent
commit
e889f953ff
  1. 2
      shadowsocks/udprelay.py

2
shadowsocks/udprelay.py

@ -528,7 +528,6 @@ class TCPRelayHandler(object):
if not data: if not data:
self.destroy() self.destroy()
return return
self._server.server_transfer_dl += len(data)
try: try:
recv_data = data recv_data = data
beg_pos = 0 beg_pos = 0
@ -547,6 +546,7 @@ class TCPRelayHandler(object):
post_data = self._pack_post_data(CMD_POST, pack_id, data) post_data = self._pack_post_data(CMD_POST, pack_id, data)
addr = self.get_local_address() addr = self.get_local_address()
self._write_to_sock(post_data, self._local_sock, addr) 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: if pack_id <= DOUBLE_SEND_BEG_IDS:
post_data = self._pack_post_data(CMD_POST, pack_id, data) post_data = self._pack_post_data(CMD_POST, pack_id, data)
self._write_to_sock(post_data, self._local_sock, addr) self._write_to_sock(post_data, self._local_sock, addr)

Loading…
Cancel
Save