Fix: NPE when cursor failed to close empty subscription
@@ -542,7 +542,9 @@ public class PersistentSubscription implements Subscription {
disconnectFuture.complete(null);
}).exceptionally(exception -> {
IS_FENCED_UPDATER.set(this, FALSE);
+ if (dispatcher != null) {
dispatcher.reset();
+ }
log.error("[{}][{}] Error disconnecting consumers from subscription", topicName, subName,
exception);
disconnectFuture.completeExceptionally(exception);
