From 31560138a262a5f4d37abd2f922e8464e93d1d04 Mon Sep 17 00:00:00 2001 From: jobayle Date: Tue, 14 May 2019 18:18:46 +0200 Subject: [PATCH] Do not close the JAX REST client It is not possible to recreate a client, and there is no point in doing so as these kind of clients are able to recover without any action from client code. --- .../dropwizard/metrics/influxdb/io/InfluxDbHttpWriter.java | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/main/java/com/kickstarter/dropwizard/metrics/influxdb/io/InfluxDbHttpWriter.java b/src/main/java/com/kickstarter/dropwizard/metrics/influxdb/io/InfluxDbHttpWriter.java index fbd4e6b..d21bed9 100644 --- a/src/main/java/com/kickstarter/dropwizard/metrics/influxdb/io/InfluxDbHttpWriter.java +++ b/src/main/java/com/kickstarter/dropwizard/metrics/influxdb/io/InfluxDbHttpWriter.java @@ -22,11 +22,9 @@ * An {@link InfluxDbWriter} that writes to an HTTP/S server using a {@link Client}. */ public class InfluxDbHttpWriter implements InfluxDbWriter { - private final Client client; private final WebTarget influxLines; public InfluxDbHttpWriter(final Client client, final String endpoint) { - this.client = client; this.influxLines = client.target(endpoint); } @@ -36,9 +34,7 @@ public void writeBytes(final byte[] bytes) { } @Override - public void close() throws IOException { - client.close(); - } + public void close() throws IOException {} // NOOP // =================================================================================================================== // Builder