diff --git a/src/appdb.js b/src/appdb.js index 8b20793bc..e4e389d84 100644 --- a/src/appdb.js +++ b/src/appdb.js @@ -43,7 +43,7 @@ exports = module.exports = { RSTATE_RUNNING: 'running', RSTATE_PENDING_START: 'pending_start', RSTATE_PENDING_STOP: 'pending_stop', - RSTATE_STOPPED: 'stopped', // app stopped by use + RSTATE_STOPPED: 'stopped', // app stopped by us // run codes (keep in sync in UI) HEALTH_HEALTHY: 'healthy', diff --git a/src/apphealthmonitor.js b/src/apphealthmonitor.js index 583a03961..718d67455 100644 --- a/src/apphealthmonitor.js +++ b/src/apphealthmonitor.js @@ -38,7 +38,7 @@ function setHealth(app, health, callback) { if (health === appdb.HEALTH_HEALTHY) { healthTime = now; - if (curHealth !== appdb.HEALTH_HEALTHY) { + if (curHealth && curHealth !== appdb.HEALTH_HEALTHY) { // app starts out with null health debugApp(app, 'app switched from %s to healthy', curHealth); // do not send mails for dev apps