diff --git a/redis_stomp/pubsub/topic.py b/redis_stomp/pubsub/topic.py index d6c3a6a..367e1a4 100644 --- a/redis_stomp/pubsub/topic.py +++ b/redis_stomp/pubsub/topic.py @@ -34,6 +34,10 @@ def __init__(self, connection: StompConnection, redis_url: str): self._closed = False self._redis = connect(redis_url, decode_responses=True).pubsub(ignore_subscribe_messages=True) + async def disconnect(self, connection: StompConnection): + await super().disconnect(connection) + await self.close() + async def close(self): self._closing = True while not self._closed: