_kick = T.Queue()
def kickpeers():
- lastip = {}
while True:
upness, reason = _kick.get()
if upness and ip is None and \
ipq is not None and (ipq & m) == a:
map[t] = 'up'
- want = t
+ if t == 'down' or t.startswith('down/'):
+ want = None
+ else:
+ want = t
ip = ipq
else:
map[t] = 'down'
changes.append(_)
## Start the right one if necessary.
- if want is not None and (not found or ip != lastip.get(g, None)):
+ if want is not None and not found:
def _(want = want):
try:
SM.svcsubmit('connect', 'active', want)
except T.TripeError, exc:
SM.warn('conntrack', 'connect-failed', want, *exc.args)
changes.append(_)
- lastip[g] = ip
## Commit the changes.
if changes: