diff --git a/pkg/machine/machine.go b/pkg/machine/machine.go index be0242d..2b258dc 100644 --- a/pkg/machine/machine.go +++ b/pkg/machine/machine.go @@ -843,9 +843,7 @@ func (m *Machine) processStateCtxBindings() { m.activeStatesLock.Lock() var toCancel []context.CancelFunc for _, s := range deactivated { - for _, cancel := range m.indexStateCtx[s] { - toCancel = append(toCancel, cancel) - } + toCancel = append(toCancel, m.indexStateCtx[s]...) delete(m.indexStateCtx, s) } m.activeStatesLock.Unlock() diff --git a/pkg/machine/misc.go b/pkg/machine/misc.go index bf3b503..79644bc 100644 --- a/pkg/machine/misc.go +++ b/pkg/machine/misc.go @@ -308,24 +308,6 @@ func (eh *ExceptionHandler) ExceptionState(e *Event) { // utils -func isMapTrue(m map[string]bool) bool { - for _, value := range m { - if !value { - return false - } - } - return true -} - -func isMapFalse(setMap map[string]bool) bool { - for _, value := range setMap { - if value { - return false - } - } - return true -} - // j joins state names func j(states []string) string { return strings.Join(states, " ")