OSDN Git Service

fix SyncManager Peer and Switch peer not match (#560)
authorYongfeng LI <wliyongfeng@gmail.com>
Mon, 9 Apr 2018 07:49:46 +0000 (15:49 +0800)
committerPaladz <yzhu101@uottawa.ca>
Mon, 9 Apr 2018 07:49:46 +0000 (15:49 +0800)
netsync/peer.go

index 9ca4d1f..f37cba5 100644 (file)
@@ -165,7 +165,6 @@ func (ps *peerSet) DropPeer(id string) error {
        if !ok {
                return errNotRegistered
        }
-       delete(ps.peers, id)
        peer.CloseConn()
        return nil
 }