Commit e15a228f authored by ibuler's avatar ibuler

[Update] 捕捉异常

parent 89596c87
...@@ -125,7 +125,8 @@ class Client(object): ...@@ -125,7 +125,8 @@ class Client(object):
def send(self, b): def send(self, b):
try: try:
return self.chan.send(b) return self.chan.send(b)
except (EOFError, OSError): except Exception as e:
logger.error('Send to client <{}> error: {}'.format(self, e))
return 0 return 0
def send_unicode(self, s): def send_unicode(self, s):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment