Merge pull request #291 from felixonmars/py3-remote-address

convert remote_address to str so it will be printed more correctly on python 3
This commit is contained in:
clowwindy 2015-02-11 15:53:24 +08:00
commit e8488895f0

View file

@ -295,7 +295,7 @@ class TCPRelayHandler(object):
logging.info('connecting %s:%d from %s:%d' %
(common.to_str(remote_addr), remote_port,
self._client_address[0], self._client_address[1]))
self._remote_address = (remote_addr, remote_port)
self._remote_address = (common.to_str(remote_addr), remote_port)
# pause reading
self._update_stream(STREAM_UP, WAIT_STATUS_WRITING)
self._stage = STAGE_DNS