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.
*/
private void close(final State stateBeforeStop) {
stopConnector(tasks, stateBeforeStop);
if (headerConverter != null) {
try {
headerConverter.close();
@ -282,7 +283,6 @@ private void close(final State stateBeforeStop) {
LOGGER.warn("Failed to close header converter: ", e);
}
}
stopConnector(tasks, stateBeforeStop);
shutDownLatch.countDown();
}