Skip to content

Commit

Permalink
[core] Move to global ERROR state if critical hook fails
Browse files Browse the repository at this point in the history
  • Loading branch information
teo committed Feb 24, 2022
1 parent 17e5b46 commit 80488a5
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions core/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -360,6 +360,10 @@ func (m *RpcServer) ControlEnvironment(cxt context.Context, req *pb.ControlEnvir

err = env.TryTransition(trans)

if err != nil {
env.Sm.SetState("ERROR")
}

reply := &pb.ControlEnvironmentReply{
Id: env.Id().String(),
State: env.CurrentState(),
Expand Down

0 comments on commit 80488a5

Please sign in to comment.