Commit 321ad941 authored by Grégory Wisniewski's avatar Grégory Wisniewski

Bug fix: Filter the client connection list with the primary's UUID.

As some client connections could have been established (but not accepted) during the previous poll(), the current client connection list can have more than one item.

git-svn-id: https://svn.erp5.org/repos/neo/trunk@1510 71dcc9de-d417-0410-9af5-da40c76e7ee4
parent 8014153c
...@@ -648,7 +648,8 @@ class Application(object): ...@@ -648,7 +648,8 @@ class Application(object):
self._waitForPrimaryAnnouncement() self._waitForPrimaryAnnouncement()
# apply the new handler to the primary connection # apply the new handler to the primary connection
client_list = self.em.getClientList() client_list = [x for x in self.em.getClientList() if x.getUUID() ==
self.primary_master_node.getUUID()]
assert len(client_list) == 1 assert len(client_list) == 1
client_list[0].setHandler(secondary.PrimaryHandler(self)) client_list[0].setHandler(secondary.PrimaryHandler(self))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment