update fs.close call in deviceserver.js
@falcone and I ran into an issue setting up an SRM-20 today. After running deviceserver.js, we can send a job, but at the end of the job an error is thrown:
The offending line is js/deviceserver.js:103
where we run fs.close
.
According to https://nodejs.org/api/fs.html#fs_fs_close_fd_callback, the callback is no longer optional (as of V7.0.0, but now throws TypeError
as of V10.0.0).
So, maybe something like:
fs.close(file,function(err) {
if (err) {
console.log('error: '+err)
ws.send('error: '+err)
}
});
?
Edited by Sam Calisch