diff --git a/google/api_core/bidi.py b/google/api_core/bidi.py index 78d98b98..4e800c88 100644 --- a/google/api_core/bidi.py +++ b/google/api_core/bidi.py @@ -306,6 +306,8 @@ def close(self): self._request_queue.put(None) self.call.cancel() self._request_generator = None + self._initial_request = None + self._callbacks = [] # Don't set self.call to None. Keep it around so that send/recv can # raise the error. @@ -717,6 +719,7 @@ def stop(self): _LOGGER.warning("Background thread did not exit.") self._thread = None + self._on_response = None @property def is_active(self):