Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@ public void removeMetrics() {

@Override
protected void close() {
if (started) {
if (started && task != null) {
Utils.closeQuietly(task::stop, "source task");
}

Expand All @@ -310,7 +310,9 @@ protected void close() {
Utils.closeQuietly(transformationChain, "transformation chain");
Utils.closeQuietly(retryWithToleranceOperator, "retry operator");
Utils.closeQuietly(offsetReader, "offset reader");
Utils.closeQuietly(offsetStore::stop, "offset backing store");
if (offsetReader != null) {
Utils.closeQuietly(offsetStore::stop, "offset backing store");
}
}

private void closeProducer(Duration duration) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -357,7 +357,10 @@ public void stop() {

relinquishWritePrivileges();
Utils.closeQuietly(ownTopicAdmin, "admin for config topic");
Utils.closeQuietly(configLog::stop, "KafkaBasedLog for config topic");

if (configLog != null) {
Utils.closeQuietly(configLog::stop, "KafkaBasedLog for config topic");
}

log.info("Closed KafkaConfigBackingStore");
}
Expand Down