Browse Source

tcprelay.py: decode remote_addr to fix extra b'' in logging on python 3

auth
Felix Yan 10 years ago
parent
commit
833c98e114
  1. 2
      shadowsocks/tcprelay.py

2
shadowsocks/tcprelay.py

@ -261,7 +261,7 @@ class TCPRelayHandler(object):
if header_result is None: if header_result is None:
raise Exception('can not parse header') raise Exception('can not parse header')
addrtype, remote_addr, remote_port, header_length = header_result addrtype, remote_addr, remote_port, header_length = header_result
logging.info('connecting %s:%d' % (remote_addr, remote_port)) logging.info('connecting %s:%d' % (remote_addr.decode('utf-8'), remote_port))
self._remote_address = (remote_addr, remote_port) self._remote_address = (remote_addr, remote_port)
# pause reading # pause reading
self._update_stream(STREAM_UP, WAIT_STATUS_WRITING) self._update_stream(STREAM_UP, WAIT_STATUS_WRITING)

Loading…
Cancel
Save