Skip to content

Commit

Permalink
fix: Fixing the shutdown logic for streaming subscriber connection (#…
Browse files Browse the repository at this point in the history
…1613)

* fix: Fixing the shutdown logic for streaming subscriber connection

* fix: Fixing the shutdown logic for streaming subscriber connection

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

---------

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
  • Loading branch information
maitrimangal and gcf-owl-bot[bot] authored Jun 20, 2023
1 parent b3f2dff commit 09aff9c
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -191,15 +191,14 @@ protected void doStart() {

@Override
protected void doStop() {
runShutdown();

lock.lock();
try {
clientStream.closeSendWithError(Status.CANCELLED.asException());
} finally {
lock.unlock();
notifyStopped();
}
runShutdown();
notifyStopped();
}

private void runShutdown() {
Expand Down

0 comments on commit 09aff9c

Please sign in to comment.