Skip to content

Commit d2a90d8

Browse files
fix: Add missing monitor from startSubscriber. (#142)
1 parent bcfd538 commit d2a90d8

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

google-cloud-pubsublite/src/main/java/com/google/cloud/pubsublite/cloudpubsub/internal/AssigningSubscriber.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,9 @@ public void failed(State from, Throwable failure) {
107107

108108
@Override
109109
public void terminated(State from) {
110-
stoppingSubscribers.remove(subscriber);
110+
try (CloseableMonitor.Hold h = monitor.enter()) {
111+
stoppingSubscribers.remove(subscriber);
112+
}
111113
}
112114
},
113115
MoreExecutors.directExecutor());

0 commit comments

Comments
 (0)