Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Making it impossible to call Policy.open() on an already opened policy. #4606

Merged
merged 3 commits into from
Dec 18, 2017

Conversation

dhermes
Copy link
Contributor

@dhermes dhermes commented Dec 16, 2017

Similar with Policy.close().

Fixes #4488.

@dhermes dhermes added the api: pubsub Issues related to the Pub/Sub API. label Dec 16, 2017
@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Dec 16, 2017
@dhermes dhermes changed the title Making it impossible to call Policy.open() on an already opened pol… Making it impossible to call Policy.open() on an already opened policy. Dec 16, 2017
@@ -159,7 +174,7 @@ def close(self):

# The subscription is closing cleanly; resolve the future if it is not
# resolved already.
if self._future is not None and not self._future.done():
if not self._future.done():
self._future.set_result(None)
self._future = None

This comment was marked as spam.

This comment was marked as spam.

@dhermes
Copy link
Contributor Author

dhermes commented Dec 16, 2017

I'll hold off on merging until we can chat about the possibility of returning the "removed" future in Policy.close().

@chemelnucfin chemelnucfin added do not close do not merge Indicates a pull request not ready for merge, due to either quality or timing. labels Dec 16, 2017
@dhermes dhermes merged commit 1a37fce into googleapis:master Dec 18, 2017
@dhermes dhermes deleted the fix-4488 branch December 18, 2017 17:15
@dhermes dhermes removed do not close do not merge Indicates a pull request not ready for merge, due to either quality or timing. labels Dec 18, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: pubsub Issues related to the Pub/Sub API. cla: yes This human has signed the Contributor License Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Multiple calls to Pub/Sub Policy.open() can "interact"
6 participants