Skip to content

Commit

Permalink
Release v0.9.1
Browse files Browse the repository at this point in the history
* bugfix: plugins will be correctly loaded after the DCS-BIOS Hub was restarted
  • Loading branch information
jboecker committed Nov 5, 2019
2 parents 543037c + b8f417f commit ac5c5be
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version: v0.9.0+{build}
version: v0.9.1+{build}
pull_requests:
do_not_increment_build_number: true
branches:
Expand Down
6 changes: 3 additions & 3 deletions src/hub-backend/pluginmanager/pluginmanager.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,13 @@ func NewPluginManager(checkoutPath string, jsonAPI *jsonapi.JsonApi, crs *contro
}

pm.stateLock.Lock()
pm.initialPluginLoadInProgress = true
mStates, _ := pm.ReadAllInstalledPluginsFromDisk()
for _, mState := range mStates {
pm.state[mState.LocalName] = mState
}
pm.initialPluginLoadInProgress = false
pm.updateDcsLuaIndex()

pm.stateLock.Unlock()

Expand Down Expand Up @@ -412,7 +415,6 @@ func (pm *pluginManager) ReadAllInstalledPluginsFromDisk() ([]*PluginState, erro
return nil, err
}

pm.initialPluginLoadInProgress = true
pluginStateList := make([]*PluginState, 0)
for _, f := range files {
if !f.IsDir() {
Expand All @@ -425,8 +427,6 @@ func (pm *pluginManager) ReadAllInstalledPluginsFromDisk() ([]*PluginState, erro
pluginStateList = append(pluginStateList, state)
pm.loadPlugin(state)
}
pm.initialPluginLoadInProgress = false
pm.updateDcsLuaIndex()
return pluginStateList, nil
}

Expand Down

0 comments on commit ac5c5be

Please sign in to comment.