catch exception when client is disconnected
This commit is contained in:
parent
8e95706763
commit
4038b81a22
|
@ -295,8 +295,13 @@ class Interface(threading.Thread):
|
|||
self.message_id += 1
|
||||
out += request + '\n'
|
||||
while out:
|
||||
sent = self.s.send( out )
|
||||
out = out[sent:]
|
||||
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…
Reference in New Issue