Fix the fix

This commit is contained in:
Charles Haley 2012-08-01 20:36:28 +02:00
parent 0140b4f43b
commit 53213fb494

View File

@ -455,10 +455,13 @@ class SMART_DEVICE_APP(DeviceConfig, DevicePlugin):
# protocol, this can only be a disconnect notification. Fall # protocol, this can only be a disconnect notification. Fall
# through and actually try to talk to the client. # through and actually try to talk to the client.
# This will usually toss an exception if the socket is gone. # This will usually toss an exception if the socket is gone.
if self._call_client('NOOP', dict())[0] is None:
self.is_connected = False
except: except:
pass
try:
if self._call_client('NOOP', dict())[0] is None:
self.is_connected = False self.is_connected = False
except:
self.is_connected = False
if not self.is_connected: if not self.is_connected:
self.device_socket.close() self.device_socket.close()
return (self.is_connected, self) return (self.is_connected, self)