[zmq] Failure of dynamic connections fanout

Change-Id: I740ac926141ff788e75be788ebaadb71e440c9f4
Closes-Bug: #1658601
This commit is contained in:
ozamiatin 2017-01-23 09:33:36 +02:00
parent 58f20a8812
commit 08b6472dbf
1 changed files with 3 additions and 2 deletions

View File

@ -105,8 +105,9 @@ class DealerPublisherProxyDynamic(
if not self.publishers:
raise zmq_matchmaker_base.MatchmakerUnavailable()
socket = self.sockets_manager.get_socket()
random.shuffle(self.publishers)
for publisher in self.publishers:
publishers = list(self.publishers)
random.shuffle(publishers)
for publisher in publishers:
socket.connect_to_host(publisher)
return socket