Fix changing keys during iteration in matchmaker heartbeat
When starting heartbeat in matchmaker-redis, keys may be changed during iteration and a runtime exception is thrown as follows: RuntimeError: dictionary changed size during iteration Change-Id: I016a449674619294196055614c62c2856002291c Closes-Bug: #1432966
This commit is contained in:
parent
ec68634d91
commit
72a9984d8f
@ -164,7 +164,7 @@ class HeartbeatMatchMakerBase(MatchMakerBase):
|
||||
Use start_heartbeat to spawn a heartbeat greenthread,
|
||||
which loops this method.
|
||||
"""
|
||||
for key, host in self.host_topic:
|
||||
for key, host in self.host_topic.keys():
|
||||
self.ack_alive(key, host)
|
||||
|
||||
def ack_alive(self, key, host):
|
||||
|
Loading…
x
Reference in New Issue
Block a user