Browse Source

show exception peer name

dev
BreakWa11 9 years ago
parent
commit
b3ab5d7c4c
  1. 10
      shadowsocks/tcprelay.py

10
shadowsocks/tcprelay.py

@ -768,12 +768,22 @@ class TCPRelayHandler(object):
logging.debug('got local error')
if self._local_sock:
logging.error(eventloop.get_sock_error(self._local_sock))
try:
addr = self._local_sock.getpeername()[:2]
logging.error('local exception peer name %s:%d' % (addr[0], addr[1]))
except:
pass
self.destroy()
def _on_remote_error(self):
logging.debug('got remote error')
if self._remote_sock:
logging.error(eventloop.get_sock_error(self._remote_sock))
try:
addr = self._remote_sock.getpeername()[:2]
logging.error('remote exception peer name %s:%d' % (addr[0], addr[1]))
except:
pass
self.destroy()
def handle_event(self, sock, event):

Loading…
Cancel
Save