diff --git a/kombu/simple.py b/kombu/simple.py index c0efe254..01ac867e 100644 --- a/kombu/simple.py +++ b/kombu/simple.py @@ -43,12 +43,12 @@ class SimpleBase(object): if self.buffer: return self.buffer.pop() try: - self.channel.connection.client.drain_events( + self.channel.connection.drain_events( timeout=timeout and remaining) except socket.timeout: raise Empty() elapsed += time() - time_start - remaining = timeout - elapsed + remaining = timeout and timeout - elapsed or None def get_nowait(self): m = self.queue.get(no_ack=self.no_ack)