mirror of
https://github.com/webbukkit/dynmap.git
synced 2024-11-24 11:15:21 +01:00
Close potential filedescriptor leak.
This commit is contained in:
parent
0007acd05b
commit
77cc1a70c4
@ -87,8 +87,15 @@ public class ClientUpdateHandler implements HttpHandler {
|
|||||||
response.fields.put(HttpField.ContentLength, Integer.toString(bytes.length));
|
response.fields.put(HttpField.ContentLength, Integer.toString(bytes.length));
|
||||||
response.status = HttpStatus.OK;
|
response.status = HttpStatus.OK;
|
||||||
|
|
||||||
BufferedOutputStream out = new BufferedOutputStream(response.getBody());
|
BufferedOutputStream out = null;
|
||||||
out.write(bytes);
|
try {
|
||||||
out.flush();
|
out = new BufferedOutputStream(response.getBody());
|
||||||
|
out.write(bytes);
|
||||||
|
out.flush();
|
||||||
|
}
|
||||||
|
finally
|
||||||
|
{
|
||||||
|
out.close();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user