Skip to content
GitLab
  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • M mods
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 8
    • Issues 8
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • pub
  • mods
  • Issues
  • #7
Closed
Open
Created Aug 14, 2019 by Sam Calisch@calischsDeveloper

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 Aug 14, 2019 by Sam Calisch
Assignee
Assign to
Time tracking