Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion packages/faststream-stomp/faststream_stomp/subscriber.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ def __init__(
self.headers = headers
self.on_suppressed_exception = on_suppressed_exception
self.suppressed_exception_classes = suppressed_exception_classes
self._subscription: stompman.Subscription | None = None

super().__init__(
no_ack=self.ack == "auto",
no_reply=True,
Expand Down Expand Up @@ -93,7 +95,8 @@ async def start(self) -> None:
)

async def close(self) -> None:
await self._subscription.unsubscribe()
if self._subscription:
await self._subscription.unsubscribe()
await super().close()

async def get_one(self, *, timeout: float = 5) -> None: ...
Expand Down