Merge pull request #169 from filecoin-project/fix/msg-wait-panic
handle channel closing properly
This commit is contained in:
commit
7df6417ba8
@ -576,7 +576,10 @@ func (cs *ChainStore) WaitForMessage(ctx context.Context, mcid cid.Cid) (cid.Cid
|
||||
|
||||
for {
|
||||
select {
|
||||
case val := <-tsub:
|
||||
case val, ok := <-tsub:
|
||||
if !ok {
|
||||
return cid.Undef, nil, ctx.Err()
|
||||
}
|
||||
switch val.Type {
|
||||
case HCRevert:
|
||||
continue
|
||||
|
Loading…
Reference in New Issue
Block a user