Skip to content

Commit

Permalink
Merge pull request #1292 from prot0man/heapq_bugfix
Browse files Browse the repository at this point in the history
Add explicit check for if timeout_heap has been set to None before do…
  • Loading branch information
lukebakken committed Jan 27, 2021
2 parents 1e4efb4 + 8f08be0 commit 92846cc
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pika/adapters/select_connection.py
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,9 @@ def call_later(self, delay, callback):
:raises ValueError, TypeError
"""
if self._timeout_heap is None:
raise ValueError("Timeout closed before call")

if delay < 0:
raise ValueError(
'call_later: delay must be non-negative, but got %r' % (delay,))
Expand Down

0 comments on commit 92846cc

Please sign in to comment.