Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
MonsterChenzhuo committed Jun 17, 2023
1 parent 9408a78 commit 1437a2d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@
import org.bson.BsonValue;
import org.jetbrains.annotations.NotNull;

import com.mongodb.client.MongoClient;
import com.mongodb.client.model.changestream.OperationType;
import io.debezium.connector.base.ChangeEventQueue;
import io.debezium.pipeline.DataChangeEvent;
Expand Down Expand Up @@ -200,13 +199,6 @@ record -> {
@Override
public void close() {
Runtime.getRuntime()
.addShutdownHook(
new Thread(
() -> {
MongoClient mongoClient = createMongoClient(sourceConfig);
if (mongoClient != null) {
mongoClient.close();
}
}));
.addShutdownHook(new Thread(() -> createMongoClient(sourceConfig).close()));
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ public boolean isRunning() {

@Override
public void shutdown() {
// taskRunning = false;
taskRunning = false;
}

@Override
Expand Down

0 comments on commit 1437a2d

Please sign in to comment.