diff --git a/server/src/main/java/org/apache/iotdb/db/sink/alertmanager/AlertManagerHandler.java b/server/src/main/java/org/apache/iotdb/db/sink/alertmanager/AlertManagerHandler.java index fd6076ff15210..600bb72db015f 100644 --- a/server/src/main/java/org/apache/iotdb/db/sink/alertmanager/AlertManagerHandler.java +++ b/server/src/main/java/org/apache/iotdb/db/sink/alertmanager/AlertManagerHandler.java @@ -61,9 +61,11 @@ public void close() throws IOException { @Override public void open(org.apache.iotdb.db.sink.alertmanager.AlertManagerConfiguration configuration) { - this.request = new HttpPost(configuration.getEndpoint()); - request.setHeader("Accept", "application/json"); - request.setHeader("Content-type", "application/json"); + if (this.request == null) { + this.request = new HttpPost(configuration.getEndpoint()); + request.setHeader("Accept", "application/json"); + request.setHeader("Content-type", "application/json"); + } openClient(); }