clowwindy 11 years ago
parent
commit
a0e1a9f1b0
  1. 6
      shadowsocks/tcprelay.py

6
shadowsocks/tcprelay.py

@ -157,6 +157,7 @@ class TCPRelayHandler(object):
uncomplete = True uncomplete = True
else: else:
logging.error(e) logging.error(e)
if self._config['verbose']:
traceback.print_exc() traceback.print_exc()
self.destroy() self.destroy()
return False return False
@ -208,6 +209,7 @@ class TCPRelayHandler(object):
self.destroy() self.destroy()
else: else:
logging.error(e) logging.error(e)
if self._config['verbose']:
traceback.print_exc() traceback.print_exc()
self.destroy() self.destroy()
@ -263,6 +265,7 @@ class TCPRelayHandler(object):
self._handle_dns_resolved) self._handle_dns_resolved)
except Exception as e: except Exception as e:
logging.error(e) logging.error(e)
if self._config['verbose']:
traceback.print_exc() traceback.print_exc()
# TODO use logging when debug completed # TODO use logging when debug completed
self.destroy() self.destroy()
@ -317,6 +320,7 @@ class TCPRelayHandler(object):
return return
except (OSError, IOError) as e: except (OSError, IOError) as e:
logging.error(e) logging.error(e)
if self._config['verbose']:
traceback.print_exc() traceback.print_exc()
self.destroy() self.destroy()
@ -375,6 +379,7 @@ class TCPRelayHandler(object):
self._write_to_sock(data, self._local_sock) self._write_to_sock(data, self._local_sock)
except Exception as e: except Exception as e:
logging.error(e) logging.error(e)
if self._config['verbose']:
traceback.print_exc() traceback.print_exc()
# TODO use logging when debug completed # TODO use logging when debug completed
self.destroy() self.destroy()
@ -593,6 +598,7 @@ class TCPRelay(object):
continue continue
else: else:
logging.error(e) logging.error(e)
if self._config['verbose']:
traceback.print_exc() traceback.print_exc()
else: else:
if sock: if sock:

Loading…
Cancel
Save