fix(control): wait for SPN to fully stop before completing pause operation
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user