Skip to content

Commit

Permalink
Run callback in goroutine (#10)
Browse files Browse the repository at this point in the history
  • Loading branch information
ingar authored Jun 8, 2020
1 parent 9ee24d3 commit 9cf2bfb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fsm/fsm.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ func (d fsmHandler) Plan(events []statemachine.Event, user interface{}) (interfa
}
currentState := userValue.Elem().FieldByName(string(d.stateKeyField)).Interface()
if d.notifier != nil {
d.notifier(eventName, userValue.Elem().Interface())
go d.notifier(eventName, userValue.Elem().Interface())
}
_, final := d.finalityStates[currentState]
if final {
Expand Down

0 comments on commit 9cf2bfb

Please sign in to comment.