mirror of
https://github.com/xcat2/confluent.git
synced 2024-11-25 02:52:07 +00:00
Only add self to collective if self not yet in collective
Previously, it was safe to just do all the time, but now it may lose the role.
This commit is contained in:
parent
4d9b11bc55
commit
22c464e092
@ -416,8 +416,10 @@ def handle_connection(connection, cert, request, local=False):
|
||||
myrsp = base64.b64encode(myrsp)
|
||||
fprint = util.get_fingerprint(cert)
|
||||
myfprint = util.get_fingerprint(mycert)
|
||||
cfm.add_collective_member(get_myname(),
|
||||
connection.getsockname()[0], myfprint)
|
||||
iam = cfm.get_collective_member(get_myname())
|
||||
if not iam:
|
||||
cfm.add_collective_member(get_myname(),
|
||||
connection.getsockname()[0], myfprint)
|
||||
cfm.add_collective_member(request['name'],
|
||||
connection.getpeername()[0], fprint, role)
|
||||
myleader = get_leader(connection)
|
||||
|
Loading…
Reference in New Issue
Block a user