Skip to content

Commit 1bfa445

Browse files
luxianguJon Wayne Parrott
authored and
Jon Wayne Parrott
committed
Fix subscription.open get called twice in the client libraries (#1321)
1 parent fb0da4c commit 1bfa445

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

pubsub/cloud-client/subscriber.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,9 +124,8 @@ def callback(message):
124124

125125
# Blocks the thread while messages are coming in through the stream. Any
126126
# exceptions that crop up on the thread will be set on the future.
127-
future = subscription.open(callback)
128127
try:
129-
future.result()
128+
subscription.future.result()
130129
except Exception as e:
131130
print(
132131
'Listening for messages on {} threw an Exception: {}.'.format(

0 commit comments

Comments
 (0)