Merge pull request #205 from felixonmars/py3-logging
tcprelay.py: decode remote_addr to fix extra b'' in logging on python 3
This commit is contained in:
commit
22b87f6f16
1 changed files with 2 additions and 1 deletions
|
@ -261,7 +261,8 @@ class TCPRelayHandler(object):
|
|||
if header_result is None:
|
||||
raise Exception('can not parse header')
|
||||
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)
|
||||
# pause reading
|
||||
self._update_stream(STREAM_UP, WAIT_STATUS_WRITING)
|
||||
|
|
Loading…
Reference in a new issue