Skip to content

Commit

Permalink
fix: clean up resources on Watch close (#1004)
Browse files Browse the repository at this point in the history
  • Loading branch information
daniel-sanche authored Jan 10, 2025
1 parent 583dc58 commit 6d68dcd
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions google/cloud/firestore_v1/watch.py
Original file line number Diff line number Diff line change
Expand Up @@ -333,9 +333,13 @@ def close(self, reason=None):
if self.is_active:
_LOGGER.debug("Stopping consumer.")
self._consumer.stop()
self._consumer._on_response = None
self._consumer = None

self._snapshot_callback = None
self._rpc.close()
self._rpc._initial_request = None
self._rpc._callbacks = []
self._rpc = None
self._closed = True
_LOGGER.debug("Finished stopping manager.")
Expand Down

0 comments on commit 6d68dcd

Please sign in to comment.