catch exception when client is disconnected
This commit is contained in:
@@ -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
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user