/// <summary> /// Removes a peer from the peer list /// </summary> /// <param name="Peer">The peer to remove</param> public void RemovePeer(P2pPeer Peer) { // Lock peer list to prevent race conditions lock (Peers) { // Stop this peer Peer.Stop(); // Remove this peer from our peer list Peers.RemoveAll(x => x == Peer); } }