Skip to content

Commit

Permalink
[fix][client] Fix orphan consumer when reconnection and closing are c…
Browse files Browse the repository at this point in the history
…oncurrency executing (apache#22958)

(cherry picked from commit 69b2739)
  • Loading branch information
poorbarcode committed Jul 15, 2024
1 parent a888220 commit 12af1f0
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -1060,7 +1060,7 @@ public void connectionFailed(PulsarClientException exception) {
}

@Override
public CompletableFuture<Void> closeAsync() {
public synchronized CompletableFuture<Void> closeAsync() {
CompletableFuture<Void> closeFuture = new CompletableFuture<>();

if (getState() == State.Closing || getState() == State.Closed) {
Expand Down

0 comments on commit 12af1f0

Please sign in to comment.