Merge pull request #169 from filecoin-project/fix/msg-wait-panic

handle channel closing properly
This commit is contained in:
Whyrusleeping
2019-08-30 11:22:11 -07:00
committed by GitHub
+4 -1
View File
@@ -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