Skip to content

Commit 80488a5

Browse files
committed
[core] Move to global ERROR state if critical hook fails
1 parent 17e5b46 commit 80488a5

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

core/server.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -360,6 +360,10 @@ func (m *RpcServer) ControlEnvironment(cxt context.Context, req *pb.ControlEnvir
360360

361361
err = env.TryTransition(trans)
362362

363+
if err != nil {
364+
env.Sm.SetState("ERROR")
365+
}
366+
363367
reply := &pb.ControlEnvironmentReply{
364368
Id: env.Id().String(),
365369
State: env.CurrentState(),

0 commit comments

Comments
 (0)