Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 64893b7

Browse filesBrowse files
luxianguplamut
authored andcommitted
Fix subscription.open get called twice in the client libraries [(#1321)](GoogleCloudPlatform/python-docs-samples#1321)
1 parent 464500f commit 64893b7
Copy full SHA for 64893b7

File tree

Expand file treeCollapse file tree

1 file changed

+1
-2
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+1
-2
lines changed
Open diff view settings
Collapse file

‎samples/snippets/subscriber.py‎

Copy file name to clipboardExpand all lines: samples/snippets/subscriber.py
+1-2Lines 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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.