Skip to content

Commit

Permalink
Fix subscription.open get called twice in the client libraries [(#132…
Browse files Browse the repository at this point in the history
  • Loading branch information
luxiangu authored and plamut committed Jul 10, 2020
1 parent 489b381 commit 010ad9d
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions samples/snippets/subscriber.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit 010ad9d

Please sign in to comment.