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
|
self.message_id += 1
|
||||||
out += request + '\n'
|
out += request + '\n'
|
||||||
while out:
|
while out:
|
||||||
sent = self.s.send( out )
|
try:
|
||||||
out = out[sent:]
|
sent = self.s.send( out )
|
||||||
|
out = out[sent:]
|
||||||
|
except:
|
||||||
|
# this happens when we get disconnected
|
||||||
|
print "Not connected, cannot send"
|
||||||
|
return None
|
||||||
return ids
|
return ids
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue