Skip to content

Commit 09aff9c

Browse files
fix: Fixing the shutdown logic for streaming subscriber connection (#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
1 parent b3f2dff commit 09aff9c

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/StreamingSubscriberConnection.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -191,15 +191,14 @@ protected void doStart() {
191191

192192
@Override
193193
protected void doStop() {
194-
runShutdown();
195-
196194
lock.lock();
197195
try {
198196
clientStream.closeSendWithError(Status.CANCELLED.asException());
199197
} finally {
200198
lock.unlock();
201-
notifyStopped();
202199
}
200+
runShutdown();
201+
notifyStopped();
203202
}
204203

205204
private void runShutdown() {

0 commit comments

Comments
 (0)