handle channel closing properly
This commit is contained in:
parent
55abcaa7d0
commit
6144f1af73
@ -576,7 +576,10 @@ func (cs *ChainStore) WaitForMessage(ctx context.Context, mcid cid.Cid) (cid.Cid
|
|||||||
|
|
||||||
for {
|
for {
|
||||||
select {
|
select {
|
||||||
case val := <-tsub:
|
case val, ok := <-tsub:
|
||||||
|
if !ok {
|
||||||
|
return cid.Undef, nil, ctx.Err()
|
||||||
|
}
|
||||||
switch val.Type {
|
switch val.Type {
|
||||||
case HCRevert:
|
case HCRevert:
|
||||||
continue
|
continue
|
||||||
|
Loading…
Reference in New Issue
Block a user