fix: too many open files

Signed-off-by: Andrew Calcutt <acalcutt@techidiots.net>
This commit is contained in:
Andrew Calcutt 2023-10-08 15:17:09 -04:00
parent 08b3a943a6
commit ee49ad05b8

View file

@ -154,6 +154,7 @@ const ReadBytes = async (filePath, offset, size) => {
break; break;
} }
} }
fs.closeSync(fd); //close file when finished
return BufferToArrayBuffer(sharedBuffer); return BufferToArrayBuffer(sharedBuffer);
}; };