Skip to content
Snippets Groups Projects
Commit db169865 authored by Guido Trotter's avatar Guido Trotter
Browse files

confd client: copy the peers in UpdatePeerList


Since the peer list is shuffled by the client, we don't keep a reference
to the list which was passed in, but copy it internally.

Signed-off-by: default avatarGuido Trotter <ultrotter@google.com>
Reviewed-by: default avatarIustin Pop <iustin@google.com>
parent 43983a88
No related branches found
No related tags found
No related merge requests found
......@@ -133,7 +133,8 @@ class ConfdClient:
# pylint: disable-msg=W0201
if not isinstance(peers, list):
raise errors.ProgrammerError("peers must be a list")
self._peers = peers
# make a copy of peers, since we're going to shuffle the list, later
self._peers = list(peers)
def _PackRequest(self, request, now=None):
"""Prepare a request to be sent on the wire.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment