|
@ -769,23 +769,16 @@ class TCPRelayHandler(object): |
|
|
if self._local_sock: |
|
|
if self._local_sock: |
|
|
logging.error(eventloop.get_sock_error(self._local_sock)) |
|
|
logging.error(eventloop.get_sock_error(self._local_sock)) |
|
|
logging.error("exception from %s:%d" % (self._client_address[0], self._client_address[1])) |
|
|
logging.error("exception from %s:%d" % (self._client_address[0], self._client_address[1])) |
|
|
try: |
|
|
|
|
|
addr = self._local_sock.getpeername() |
|
|
|
|
|
logging.error('local exception peer name %s:%d' % (addr[0], addr[1])) |
|
|
|
|
|
except: |
|
|
|
|
|
logging.error('no peer name') |
|
|
|
|
|
self.destroy() |
|
|
self.destroy() |
|
|
|
|
|
|
|
|
def _on_remote_error(self): |
|
|
def _on_remote_error(self): |
|
|
logging.debug('got remote error') |
|
|
logging.debug('got remote error') |
|
|
if self._remote_sock: |
|
|
if self._remote_sock: |
|
|
logging.error(eventloop.get_sock_error(self._remote_sock)) |
|
|
logging.error(eventloop.get_sock_error(self._remote_sock)) |
|
|
|
|
|
if self._remote_address: |
|
|
|
|
|
logging.error("when connect to %s:%d from %s:%d" % (self._remote_address[0], self._remote_address[1], self._client_address[0], self._client_address[1])) |
|
|
|
|
|
else: |
|
|
logging.error("exception from %s:%d" % (self._client_address[0], self._client_address[1])) |
|
|
logging.error("exception from %s:%d" % (self._client_address[0], self._client_address[1])) |
|
|
try: |
|
|
|
|
|
addr = self._remote_sock.getpeername() |
|
|
|
|
|
logging.error('remote exception peer name %s:%d' % (addr[0], addr[1])) |
|
|
|
|
|
except: |
|
|
|
|
|
logging.error('no peer name') |
|
|
|
|
|
self.destroy() |
|
|
self.destroy() |
|
|
|
|
|
|
|
|
def handle_event(self, sock, event): |
|
|
def handle_event(self, sock, event): |
|
|