mirror of
https://github.com/safing/portbase
synced 2025-04-18 00:19:09 +00:00
Fix dependency loop when a module fails to shut down
This commit is contained in:
parent
ab21e88ae9
commit
85e36e3d68
1 changed files with 7 additions and 5 deletions
|
@ -273,12 +273,14 @@ func (m *Module) stopAllTasks(reports chan *report) {
|
|||
"module-failed-stop",
|
||||
fmt.Sprintf("failed to stop module: %s", err.Error()),
|
||||
)
|
||||
} else {
|
||||
m.Lock()
|
||||
m.status = StatusOffline
|
||||
m.Unlock()
|
||||
m.notifyOfChange()
|
||||
}
|
||||
|
||||
// Always set to offline in order to let other modules shutdown in order.
|
||||
m.Lock()
|
||||
m.status = StatusOffline
|
||||
m.Unlock()
|
||||
m.notifyOfChange()
|
||||
|
||||
// send report
|
||||
reports <- &report{
|
||||
module: m,
|
||||
|
|
Loading…
Add table
Reference in a new issue