From 1bfa44503843ab921c5c2bd7f552d784c5bfee3e Mon Sep 17 00:00:00 2001 From: L J Date: Wed, 17 Jan 2018 13:27:44 -0500 Subject: [PATCH] Fix subscription.open get called twice in the client libraries (#1321) --- pubsub/cloud-client/subscriber.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) 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(