mirror of
https://github.com/DSpace/DSpace.git
synced 2025-10-18 15:33:09 +00:00
Fix to avoid connection pool exhaustion for slow downloads and big files
This commit is contained in:
@@ -218,6 +218,9 @@ public class BitstreamServlet extends DSpaceServlet
|
|||||||
UIUtil.setBitstreamDisposition(bitstream.getName(), request, response);
|
UIUtil.setBitstreamDisposition(bitstream.getName(), request, response);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//DO NOT REMOVE IT - WE NEED TO FREE DB CONNECTION TO AVOID CONNECTION POOL EXHAUSTION FOR BIG FILES AND SLOW DOWNLOADS
|
||||||
|
context.complete();
|
||||||
|
|
||||||
Utils.bufferedCopy(is, response.getOutputStream());
|
Utils.bufferedCopy(is, response.getOutputStream());
|
||||||
is.close();
|
is.close();
|
||||||
response.getOutputStream().flush();
|
response.getOutputStream().flush();
|
||||||
|
Reference in New Issue
Block a user