show exception peer name
This commit is contained in:
parent
2e65becc44
commit
8b35508b6f
2 changed files with 5 additions and 3 deletions
|
@ -216,6 +216,11 @@ class EventLoop(object):
|
|||
handler.handle_event(sock, fd, event)
|
||||
except (OSError, IOError) as e:
|
||||
shell.print_exception(e)
|
||||
try:
|
||||
addr = sock.getpeername()[:2]
|
||||
logging.error('exception peer name %s:%d' % (addr[0], addr[1]))
|
||||
except:
|
||||
pass
|
||||
now = time.time()
|
||||
if asap or now - self._last_time >= TIMEOUT_PRECISION:
|
||||
for callback in self._periodic_callbacks:
|
||||
|
|
|
@ -1008,9 +1008,6 @@ class TCPRelay(object):
|
|||
if error_no in (errno.EAGAIN, errno.EINPROGRESS,
|
||||
errno.EWOULDBLOCK):
|
||||
return
|
||||
elif error_no == errno.ECONNRESET:
|
||||
shell.print_exception(e)
|
||||
logging.info("recv RST, ignore")
|
||||
else:
|
||||
shell.print_exception(e)
|
||||
if self._config['verbose']:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue