Skip to content

Commit

Permalink
Merge pull request #108 from happybits/blocking_read_timeout_fix
Browse files Browse the repository at this point in the history
self.conn.brpop returns None on timeout
  • Loading branch information
coleifer committed Jul 16, 2015
2 parents dce841d + 814331b commit 82451fe
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion huey/backends/redis_backend.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ def read(self):
return self.conn.brpop(
self.queue_name,
timeout=self.read_timeout)[1]
except ConnectionError:
except (ConnectionError, TypeError, IndexError):
# unfortunately, there is no way to differentiate a socket timing
# out and a host being unreachable
return None
Expand Down

0 comments on commit 82451fe

Please sign in to comment.