sealing: Don't infinite-loop on fatal errors
This commit is contained in:
parent
54289225e8
commit
943197e65c
5
fsm.go
5
fsm.go
@ -21,9 +21,8 @@ func (m *Sealing) Plan(events []statemachine.Event, user interface{}) (interface
|
|||||||
return func(ctx statemachine.Context, si SectorInfo) error {
|
return func(ctx statemachine.Context, si SectorInfo) error {
|
||||||
err := next(ctx, si)
|
err := next(ctx, si)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
if err := ctx.Send(SectorFatalError{error: err}); err != nil {
|
log.Errorf("unhandled sector error (%d): %+v", si.SectorID, err)
|
||||||
return xerrors.Errorf("error while sending error: reporting %+v: %w", err, err)
|
return nil
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
|
Loading…
Reference in New Issue
Block a user