diff --git a/src/main/java/org/influxdb/impl/InfluxDBImpl.java b/src/main/java/org/influxdb/impl/InfluxDBImpl.java index d81ca517c..9398b09e7 100644 --- a/src/main/java/org/influxdb/impl/InfluxDBImpl.java +++ b/src/main/java/org/influxdb/impl/InfluxDBImpl.java @@ -71,6 +71,7 @@ public class InfluxDBImpl implements InfluxDB { private final InetAddress hostAddress; private final String username; private final String password; + private String version; private final Retrofit retrofit; private final InfluxDBService influxDBService; private BatchProcessor batchProcessor; @@ -313,7 +314,10 @@ public Pong ping() { @Override public String version() { - return ping().getVersion(); + if (version == null) { + this.version = ping().getVersion(); + } + return this.version; } @Override