Fix mpool sub not unsubbing

Resolves #786

License: MIT
Signed-off-by: Jakub Sztandera <kubuxu@protocol.ai>
This commit is contained in:
Jakub Sztandera 2019-12-08 16:00:45 +01:00
parent 8bb6ab02e3
commit 74327ff575
No known key found for this signature in database
GPG Key ID: 9A9AF56F8B3879BA

View File

@ -21,7 +21,6 @@ import (
"github.com/filecoin-project/lotus/api"
"github.com/filecoin-project/lotus/build"
"github.com/filecoin-project/lotus/chain"
"github.com/filecoin-project/lotus/chain/address"
"github.com/filecoin-project/lotus/chain/stmgr"
"github.com/filecoin-project/lotus/chain/store"
@ -644,7 +643,7 @@ func (mp *MessagePool) Updates(ctx context.Context) (<-chan api.MpoolUpdate, err
sub := mp.changes.Sub(localUpdates)
go func() {
defer mp.changes.Unsub(sub, chain.LocalIncoming)
defer mp.changes.Unsub(sub, localUpdates)
for {
select {