sealing: Don't infinite-loop on fatal errors

This commit is contained in:
Łukasz Magiera 2020-01-23 17:11:58 +01:00
parent 54289225e8
commit 943197e65c

5
fsm.go
View File

@ -21,9 +21,8 @@ func (m *Sealing) Plan(events []statemachine.Event, user interface{}) (interface
return func(ctx statemachine.Context, si SectorInfo) error {
err := next(ctx, si)
if err != nil {
if err := ctx.Send(SectorFatalError{error: err}); err != nil {
return xerrors.Errorf("error while sending error: reporting %+v: %w", err, err)
}
log.Errorf("unhandled sector error (%d): %+v", si.SectorID, err)
return nil
}
return nil