Skip to content

Commit

Permalink
fix: bug because of const
Browse files Browse the repository at this point in the history
  • Loading branch information
Unitech committed May 10, 2018
1 parent c43414a commit 56f05a9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/API.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ class API {

constructor (opts) {
if (!opts) opts = {};
const that = this;
var that = this;

this.daemon_mode = typeof(opts.daemon_mode) == 'undefined' ? true : opts.daemon_mode;
this.pm2_home = conf.PM2_ROOT_PATH;
Expand Down Expand Up @@ -80,7 +80,7 @@ class API {
else if (opts.independent == true && conf.IS_WINDOWS === false) {
// Create an unique pm2 instance
const crypto = require('crypto');
const random_file = crypto.randomBytes(8).toString('hex');
var random_file = crypto.randomBytes(8).toString('hex');
this.pm2_home = path.join('/tmp', random_file);

// If we dont explicitly tell to have a daemon
Expand Down Expand Up @@ -112,7 +112,7 @@ class API {
this.gl_is_km_linked = false;

try {
const pid = fs.readFileSync(conf.INTERACTOR_PID_PATH);
var pid = fs.readFileSync(conf.INTERACTOR_PID_PATH);
pid = parseInt(pid.toString().trim());
process.kill(pid, 0);
that.gl_is_km_linked = true;
Expand Down

0 comments on commit 56f05a9

Please sign in to comment.