mirror of
https://github.com/BlueMap-Minecraft/BlueMap.git
synced 2024-11-22 02:26:00 +01:00
Fix webapp data-stream not being closed in rare cases
This commit is contained in:
parent
79c225433b
commit
0d64bc0adf
@ -130,7 +130,7 @@ private void writeToResponse(CompressedInputStream data, HttpResponse response,
|
||||
) {
|
||||
response.addHeader("Content-Encoding", Compression.GZIP.getId());
|
||||
ByteArrayOutputStream byteOut = new ByteArrayOutputStream();
|
||||
try (OutputStream os = Compression.GZIP.compress(byteOut)) {
|
||||
try (data; OutputStream os = Compression.GZIP.compress(byteOut)) {
|
||||
data.decompress().transferTo(os);
|
||||
}
|
||||
byte[] compressedData = byteOut.toByteArray();
|
||||
|
Loading…
Reference in New Issue
Block a user