Skip to content

Commit af39ca9

Browse files
visionsky1986brian-brazil
authored andcommitted
GZIPOutputStream won't close, may cause native memory leak (#426)
Signed-off-by: vision <[email protected]>
1 parent 1950cff commit af39ca9

File tree

1 file changed

+1
-1
lines changed
  • simpleclient_httpserver/src/main/java/io/prometheus/client/exporter

1 file changed

+1
-1
lines changed

simpleclient_httpserver/src/main/java/io/prometheus/client/exporter/HTTPServer.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ public void handle(HttpExchange t) throws IOException {
7070
t.sendResponseHeaders(HttpURLConnection.HTTP_OK, 0);
7171
final GZIPOutputStream os = new GZIPOutputStream(t.getResponseBody());
7272
response.writeTo(os);
73-
os.finish();
73+
os.close();
7474
} else {
7575
t.getResponseHeaders().set("Content-Length",
7676
String.valueOf(response.size()));

0 commit comments

Comments
 (0)