diff options
author | Daniel Høyer Iversen <mail@dahoiv.net> | 2017-04-22T19·38+0200 |
---|---|---|
committer | Matthew Garrett <mjg59-github@srcf.ucam.org> | 2017-04-22T19·38-0700 |
commit | 19851ed423733e90f4e71f8c585fcf3b1b537b49 (patch) | |
tree | 3a55eb4cf1d0ef85d29f268fa18e185c287e8170 /broadlink/__init__.py | |
parent | d346476e6397be9f428c38ac7fe567e91ba3dab1 (diff) |
bug fix in timeout (#70)
Diffstat (limited to 'broadlink/__init__.py')
-rw-r--r-- | broadlink/__init__.py | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/broadlink/__init__.py b/broadlink/__init__.py index 495e07c99f0b..f875f5ba9013 100644 --- a/broadlink/__init__.py +++ b/broadlink/__init__.py @@ -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]) |