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
commit 7df6417ba8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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