Skip to content

Commit

Permalink
fix: unsubscribe consumer before stopping (#37)
Browse files Browse the repository at this point in the history
Co-authored-by: Marcos Schroh <[email protected]>
  • Loading branch information
marcosschroh and marcosschroh authored Aug 10, 2022
1 parent d3902e3 commit b5c3b0b
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions kstreams/streams.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@ def _create_consumer(self) -> ConsumerType:
async def stop(self) -> None:
if not self.running:
return None

self.consumer.unsubscribe()
await self.consumer.stop()
self.running = False

Expand Down

0 comments on commit b5c3b0b

Please sign in to comment.