Skip to content

Commit 5a31a01

Browse files
fix: also close all pubsub clients
1 parent c9137f5 commit 5a31a01

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

reflex/state.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3641,6 +3641,10 @@ async def close(self):
36413641
redis = await self.get_redis()
36423642
await redis.close()
36433643

3644+
for pubsub in self._pubsub_clients.values():
3645+
await pubsub.close()
3646+
self._pubsub_clients = {}
3647+
36443648

36453649
def get_state_manager() -> StateManager:
36463650
"""Get the state manager for the app that is currently running.

0 commit comments

Comments
 (0)