Skip to content

Conversation

@pongad
Copy link
Contributor

@pongad pongad commented Feb 27, 2017

When PollingSubscriberConnection fails, it calls notifyFailed.
Subscriber listens to this failure and stops all connections before
failing itself.
Stopping connections is implemented with stopAsync.

The problem is with the connection that originally failed.
Since it has already entered the FAILED state, it cannot be stopped
by stopAsync.
Consequently, this leaks a MessageDispatcher.

This commit makes the connection explicitly stop itself before notifying
the Subscriber that it has failed.

cc @davidtorres

When PollingSubscriberConnection fails, it calls `notifyFailed`.
Subscriber listens to this failure and stops all connections before
failing itself.
Stopping connections is implemented with `stopAsync`.

The problem is with the connection that originally failed.
Since it has already entered the FAILED state, it cannot be stopped
by `stopAsync`.
Consequently, this leaks a MessageDispatcher.

This commit makes the connection explicitly stop itself before notifying
the Subscriber that it has failed.
@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Feb 27, 2017
@coveralls
Copy link

Coverage Status

Changes Unknown when pulling b42d9f4 on pongad:subscriber-stop into ** on GoogleCloudPlatform:master**.

@garrettjonesgoogle
Copy link
Member

LGTM

@pongad pongad merged commit 9fa3b3e into googleapis:master Mar 1, 2017
@pongad pongad deleted the subscriber-stop branch March 1, 2017 01:43
chingor13 pushed a commit that referenced this pull request Jan 22, 2026
Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla: yes This human has signed the Contributor License Agreement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants