Skip to content

Commit

Permalink
fix: plugin status shows Stopped after configuring or restarting a pl…
Browse files Browse the repository at this point in the history
…ugin (#594)
  • Loading branch information
sbender9 authored and tkurki committed Aug 21, 2018
1 parent 83016dc commit 0570292
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,11 @@ function Server(opts) {
}

function doSetProviderStatus(providerId, statusMessage, type) {
if (!statusMessage) {
delete app.providerStatus[providerId]
return
}

if (_.isUndefined(app.providerStatus[providerId])) {
app.providerStatus[providerId] = {}
}
Expand Down
1 change: 1 addition & 0 deletions lib/interfaces/plugins.js
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,7 @@ module.exports = function (app) {
function doPluginStart (app, plugin, location, configuration, restart) {
debug('Starting plugin %s from %s', plugin.name, location)
try {
app.setProviderStatus(plugin.name, null)
plugin.start(configuration, restart)
debug('Started plugin ' + plugin.name)
setPluginStartedMessage(plugin)
Expand Down

0 comments on commit 0570292

Please sign in to comment.