DBZ-8106 Stop header converter after stopping connector and its tasks

This commit is contained in:
Vojtech Juranek 2024-07-30 15:47:19 +02:00 committed by Jiri Pechanec
parent fcf2cf1752
commit 63377d9d6a

View File

@ -274,6 +274,7 @@ public void runWithTask(final Consumer<SourceTask> consumer) {
* @param stateBeforeStop {@link State} of the engine when the shutdown was requested. * @param stateBeforeStop {@link State} of the engine when the shutdown was requested.
*/ */
private void close(final State stateBeforeStop) { private void close(final State stateBeforeStop) {
stopConnector(tasks, stateBeforeStop);
if (headerConverter != null) { if (headerConverter != null) {
try { try {
headerConverter.close(); headerConverter.close();
@ -282,7 +283,6 @@ private void close(final State stateBeforeStop) {
LOGGER.warn("Failed to close header converter: ", e); LOGGER.warn("Failed to close header converter: ", e);
} }
} }
stopConnector(tasks, stateBeforeStop);
shutDownLatch.countDown(); shutDownLatch.countDown();
} }