Browse Source

catch exception when client is disconnected

283
thomasv 12 years ago
parent
commit
4038b81a22
  1. 5
      lib/interface.py

5
lib/interface.py

@ -295,8 +295,13 @@ class Interface(threading.Thread):
self.message_id += 1
out += request + '\n'
while out:
try:
sent = self.s.send( out )
out = out[sent:]
except:
# this happens when we get disconnected
print "Not connected, cannot send"
return None
return ids

Loading…
Cancel
Save