handle channel closing properly

This commit is contained in:
whyrusleeping 2019-08-29 20:25:31 -07:00
parent 55abcaa7d0
commit 6144f1af73

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