guard with ctx
This commit is contained in:
parent
26707a5e03
commit
1245871004
6
extern/storage-sealing/input.go
vendored
6
extern/storage-sealing/input.go
vendored
@ -340,8 +340,12 @@ func (m *Sealing) SectorAddPieceToAny(ctx context.Context, size abi.UnpaddedPiec
|
|||||||
}
|
}
|
||||||
}()
|
}()
|
||||||
|
|
||||||
res := <-resCh
|
select {
|
||||||
|
case res := <-resCh:
|
||||||
return api.SectorOffset{Sector: res.sn, Offset: res.offset.Padded()}, res.err
|
return api.SectorOffset{Sector: res.sn, Offset: res.offset.Padded()}, res.err
|
||||||
|
case <-ctx.Done():
|
||||||
|
return api.SectorOffset{}, ctx.Err()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (m *Sealing) MatchPendingPiecesToOpenSectors(ctx context.Context) error {
|
func (m *Sealing) MatchPendingPiecesToOpenSectors(ctx context.Context) error {
|
||||||
|
Loading…
Reference in New Issue
Block a user