mirror of
https://github.com/safing/portbase
synced 2025-09-05 04:00:14 +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",
|
"module-failed-stop",
|
||||||
fmt.Sprintf("failed to stop module: %s", err.Error()),
|
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
|
// send report
|
||||||
reports <- &report{
|
reports <- &report{
|
||||||
module: m,
|
module: m,
|
||||||
|
|
Loading…
Add table
Reference in a new issue