Skip to content

Commit

Permalink
Fix: NPE when cursor failed to close empty subscription (apache#1662)
Browse files Browse the repository at this point in the history
  • Loading branch information
rdhabalia authored and merlimat committed Apr 27, 2018
1 parent 02eff26 commit 8335d7c
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -542,7 +542,9 @@ public synchronized CompletableFuture<Void> disconnect() {
disconnectFuture.complete(null);
}).exceptionally(exception -> {
IS_FENCED_UPDATER.set(this, FALSE);
dispatcher.reset();
if (dispatcher != null) {
dispatcher.reset();
}
log.error("[{}][{}] Error disconnecting consumers from subscription", topicName, subName,
exception);
disconnectFuture.completeExceptionally(exception);
Expand Down

0 comments on commit 8335d7c

Please sign in to comment.