diff --git a/pubsub/cloud-client/subscriber.py b/pubsub/cloud-client/subscriber.py index 577e77cb9e6e..1fd480e59a21 100644 --- a/pubsub/cloud-client/subscriber.py +++ b/pubsub/cloud-client/subscriber.py @@ -124,9 +124,8 @@ def callback(message): # Blocks the thread while messages are coming in through the stream. Any # exceptions that crop up on the thread will be set on the future. - future = subscription.open(callback) try: - future.result() + subscription.future.result() except Exception as e: print( 'Listening for messages on {} threw an Exception: {}.'.format(