mirror of
https://github.com/alibaba/canal.git
synced 2026-11-04 00:30:15 +08:00
fixed #1490
This commit is contained in:
@@ -230,6 +230,9 @@ public class ESAdapter implements OuterAdapter {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void destroy() {
|
public void destroy() {
|
||||||
|
if (esConfigMonitor != null) {
|
||||||
|
esConfigMonitor.destroy();
|
||||||
|
}
|
||||||
if (transportClient != null) {
|
if (transportClient != null) {
|
||||||
transportClient.close();
|
transportClient.close();
|
||||||
}
|
}
|
||||||
@@ -237,10 +240,6 @@ public class ESAdapter implements OuterAdapter {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getDestination(String task) {
|
public String getDestination(String task) {
|
||||||
if (esConfigMonitor != null) {
|
|
||||||
esConfigMonitor.destroy();
|
|
||||||
}
|
|
||||||
|
|
||||||
ESSyncConfig config = esSyncConfig.get(task);
|
ESSyncConfig config = esSyncConfig.get(task);
|
||||||
if (config != null) {
|
if (config != null) {
|
||||||
return config.getDestination();
|
return config.getDestination();
|
||||||
|
|||||||
Reference in New Issue
Block a user