Cache files to improve genieacs-fs performance
This also fixes a memory leak issue when the client disconnects before completing the download. I suspect the leak had something to do with using pipe() but I'm not sure if it's a bug in MongoDB driver or that we were lacking proper error handling. Anyway, the pipe is no longer leaking :)
This commit is contained in:
1 parent
cc89fd92d7
commit
7594883404
3 files changed
+66
-38
No files matched your search
+1
-1
@@ -94,7 +94,7 @@ if (!cluster.worker) {
|
||||
|
||||
const _listener = (req, res): void => {
|
||||
if (stopping) res.setHeader("Connection", "close");
|
||||
listener(req, res);
|
||||
void listener(req, res);
|
||||
};
|
||||
|
||||
const initPromise = db
|
||||
|
||||
Reference in new issue
Block a user