Skip to content

Commit

Permalink
While closing-topic: remove producer from set in separate thread than…
Browse files Browse the repository at this point in the history
… same set-iterator thread (apache#32)
  • Loading branch information
rdhabalia authored and merlimat committed Sep 22, 2016
1 parent 4e1bde9 commit 7d317bd
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -328,8 +328,10 @@ void closeNow() {
public CompletableFuture<Void> disconnect() {
if (!closeFuture.isDone()) {
log.info("Disconnecting producer: {}", this);
cnx.closeProducer(this);
closeNow();
cnx.ctx().executor().execute(() -> {
cnx.closeProducer(this);
closeNow();
});
}
return closeFuture;
}
Expand Down

0 comments on commit 7d317bd

Please sign in to comment.