diff --git a/aiormq/base.py b/aiormq/base.py index b8bf9bd..b220207 100644 --- a/aiormq/base.py +++ b/aiormq/base.py @@ -57,7 +57,7 @@ async def reject_all(self, exception: Optional[ExceptionType]) -> None: if isinstance(future, TaskWrapper): future.throw(exception or Exception) tasks.append(future) - elif isinstance(future, asyncio.Future): + elif asyncio.isfuture(future): future.set_exception(exception or Exception) if tasks: