Previously we only checked for transport. This can leave a duff peer
running without being fixed. The downside is that this may end up
repeatedly kicking a no-hoper connection. Treat crypto setup failure as
grounds for reconnection.
"""
S.rawcommand(T.TripeAsynchronousCommand(
me._q, (me._peer, me.seq),
"""
S.rawcommand(T.TripeAsynchronousCommand(
me._q, (me._peer, me.seq),
'-background', S.bgtag(),
'-timeout', str(me._timeout),
'--',
'-background', S.bgtag(),
'-timeout', str(me._timeout),
'--',
me._ping()
elif code == 'FAIL':
S.notify('watch', 'ping-failed', me._peer, *stuff)
me._ping()
elif code == 'FAIL':
S.notify('watch', 'ping-failed', me._peer, *stuff)
- if stuff and stuff[0] == 'unknown-peer':
+ if not stuff:
+ pass
+ elif stuff[0] == 'unknown-peer':
me._pinger.kill(me._peer)
me._pinger.kill(me._peer)
+ elif stuff[0] == 'ping-send-failed':
+ me._reconnect()
elif code == 'INFO':
if stuff[0] == 'ping-ok':
if me._failures > 0:
elif code == 'INFO':
if stuff[0] == 'ping-ok':
if me._failures > 0: