diff --git a/pubsub/google/cloud/pubsub_v1/subscriber/futures.py b/pubsub/google/cloud/pubsub_v1/subscriber/futures.py index 11fddf24abd0..f3c06416083b 100644 --- a/pubsub/google/cloud/pubsub_v1/subscriber/futures.py +++ b/pubsub/google/cloud/pubsub_v1/subscriber/futures.py @@ -30,7 +30,7 @@ def __init__(self, manager): super(StreamingPullFuture, self).__init__() self._manager = manager self._manager.add_close_callback(self._on_close_callback) - self._cancelled = True + self._cancelled = False def _on_close_callback(self, manager, result): if result is None: diff --git a/pubsub/tests/unit/pubsub_v1/subscriber/test_futures_subscriber.py b/pubsub/tests/unit/pubsub_v1/subscriber/test_futures_subscriber.py index 4d41713e6ec8..2b4566018f7f 100644 --- a/pubsub/tests/unit/pubsub_v1/subscriber/test_futures_subscriber.py +++ b/pubsub/tests/unit/pubsub_v1/subscriber/test_futures_subscriber.py @@ -34,6 +34,7 @@ def test_default_state(self): assert future.running() assert not future.done() + assert not future.cancelled() future._manager.add_close_callback.assert_called_once_with( future._on_close_callback )