sealing: Don't infinite-loop on fatal errors

This commit is contained in:
Łukasz Magiera 2020-01-23 17:11:58 +01:00
parent 08a2e0f82c
commit df9dfa9d0c

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