Send the first few NOOPs more quickly. Apparently one can get lost, leaving the user looking at a "wait" dialog for 10 seconds.

This commit is contained in:
Charles Haley 2013-10-05 12:13:21 +02:00
parent f55b13aeb0
commit bb61a6c87d

View File

@ -845,8 +845,9 @@ class SMART_DEVICE_APP(DeviceConfig, DevicePlugin):
self.is_connected = False
if self.is_connected:
self.noop_counter += 1
if only_presence and (
self.noop_counter % self.SEND_NOOP_EVERY_NTH_PROBE) != 1:
if (only_presence and
self.noop_counter > self.SEND_NOOP_EVERY_NTH_PROBE and
(self.noop_counter % self.SEND_NOOP_EVERY_NTH_PROBE) != 1):
try:
ans = select.select((self.device_socket,), (), (), 0)
if len(ans[0]) == 0: