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