Skip to content

Commit 77b64bd

Browse files
committed
Close client after potential batch flush.
1 parent d836cab commit 77b64bd

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/main/java/org/influxdb/impl/InfluxDBImpl.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -828,15 +828,15 @@ public void flush() {
828828
*/
829829
@Override
830830
public void close() {
831-
this.client.dispatcher().executorService().shutdown();
832-
this.client.connectionPool().evictAll();
833831
try {
834832
this.disableBatch();
835833
} finally {
836834
if (datagramSocket != null && !datagramSocket.isClosed()) {
837835
datagramSocket.close();
838836
}
839837
}
838+
this.client.dispatcher().executorService().shutdown();
839+
this.client.connectionPool().evictAll();
840840
}
841841

842842
@Override

0 commit comments

Comments
 (0)