Skip to content

Commit b39081d

Browse files
author
dkl
committed
fix manager close
1 parent 0e6ddce commit b39081d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

p2p/base.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -86,9 +86,9 @@ func (mgr *Manager) Wait() {}
8686
// Close close p2p
8787
func (mgr *Manager) Close() {
8888

89-
for _, p2p := range mgr.p2ps {
89+
for i, p2p := range mgr.p2ps {
9090
p2p.CloseP2P()
91-
p2p = nil
91+
mgr.p2ps[i] = nil
9292
}
9393
mgr.p2ps = nil
9494
//mgr.PubSub.Unsub(mgr.subChan)

0 commit comments

Comments
 (0)