Skip to content

Commit

Permalink
Kill child process when logging out
Browse files Browse the repository at this point in the history
  • Loading branch information
rvazarkar committed Nov 3, 2016
1 parent db166a7 commit ebffbe0
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/components/Graph.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,16 @@ import ReactDOM from 'react-dom'
import { findGraphPath } from 'utils';
var fs = require('fs');
var child_process = require('child_process')
var child;
var path = require('path')
var child = child_process.fork(path.join(__dirname,'src','js','worker.js'), {silent:true});
const { dialog } = require('electron').remote

export default class GraphContainer extends Component {
constructor(props){
super(props)

child = child_process.fork(path.join(__dirname,'src','js','worker.js'), {silent:true});

this.state = {
sigmaInstance : null,
design: null,
Expand Down Expand Up @@ -79,6 +81,7 @@ export default class GraphContainer extends Component {
this.state.sigmaInstance.refresh();
sigma.layouts.killForceLink();
this.setState({sigmaInstance: null})
child.kill();
}.bind(this))
}

Expand Down

0 comments on commit ebffbe0

Please sign in to comment.