fix(control): wait for SPN to fully stop before completing pause operation

This commit is contained in:
Alexandr Stelnykovych
2025-11-28 13:26:14 +02:00
parent b12729cb3a
commit 569e0a70dd
3 changed files with 83 additions and 12 deletions

View File

@@ -26,11 +26,14 @@ type Control struct {
resumeWorker *mgr.WorkerMgr
pauseNotification *notifications.Notification
pauseInfo PauseInfo
cfgSpnEnabled config.BoolOption
}
type instance interface {
Config() *config.Config
InterceptionGroup() *mgr.GroupModule
SPNGroup() *mgr.ExtendedGroup
IsShuttingDown() bool
}
@@ -45,9 +48,10 @@ func New(instance instance) (*Control, error) {
m := mgr.New("Control")
module := &Control{
mgr: m,
instance: instance,
states: mgr.NewStateMgr(m),
mgr: m,
instance: instance,
states: mgr.NewStateMgr(m),
cfgSpnEnabled: config.GetAsBool("spn/enable", false),
}
if err := module.prep(); err != nil {
return nil, err