bug fix in timeout (#70)
This commit is contained in:
parent
d346476e63
commit
19851ed423
1 changed files with 2 additions and 3 deletions
|
@ -274,9 +274,8 @@ class device:
|
|||
response = self.cs.recvfrom(1024)
|
||||
break
|
||||
except socket.timeout:
|
||||
if (time.time() - starttime) < self.timeout:
|
||||
pass
|
||||
raise
|
||||
if (time.time() - starttime) > self.timeout:
|
||||
raise
|
||||
return bytearray(response[0])
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue