Skip to content

Commit

Permalink
explicit close devices on app close
Browse files Browse the repository at this point in the history
  • Loading branch information
js6450 committed May 3, 2020
1 parent f06b7c7 commit ac36e51
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
4 changes: 4 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,10 @@ app.on('activate', function(){

app.on('window-all-closed', function(){

for(let i = 0; i < devices.length; i++){
devices[i].stop();
}

app.removeAllListeners();
app.quit();

Expand Down
3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@
"ejs": "^2.6.1",
"express": "^4.16.4",
"http": "0.0.0",
//comment out kinect-azure and kinect2 to build for mac
"kinect-azure": "0.0.7",
"kinect2": "^0.1.7",
"node-gyp": "^6.1.0",
"node-librealsense": "^0.2130.0",
"nvm": "0.0.4",
Expand Down

0 comments on commit ac36e51

Please sign in to comment.