diff --git a/src/InteractorClient.js b/src/InteractorClient.js index 4912e12..759f8ce 100644 --- a/src/InteractorClient.js +++ b/src/InteractorClient.js @@ -437,7 +437,7 @@ module.exports = class InteractorDaemonizer { */ static getInteractInfo (cst, cb) { log('Getting interaction info') - if (process.env.PM2_NO_INTERACTION) return + if (process.env.PM2_NO_INTERACTION) return cb(new Error('PM2_NO_INTERACTION set')) this.ping(cst, (err, online) => { if (err || !online) return cb(new Error('Interactor is offline')) diff --git a/src/InteractorDaemon.js b/src/InteractorDaemon.js index 853d345..f24bb37 100644 --- a/src/InteractorDaemon.js +++ b/src/InteractorDaemon.js @@ -11,7 +11,7 @@ const PushInteractor = require('./push/PushInteractor.js') const Utility = require('./Utility.js') const PM2Client = require('./PM2Client.js') const TransporterInterface = require('./TransporterInterface.js') -const domain = require('domain') // eslint-disable-line +const domain = require('domain') // eslint-disable-line const WatchDog = require('./WatchDog') // use noop if not launched via IPC @@ -181,6 +181,7 @@ const InteractorDaemon = module.exports = class InteractorDaemon { } log('Connect transport with endpoints') + this.DAEMON_ACTIVE = true this.km_data = data this.transport.connect(data.endpoints, cb) })