add a delay between reconnection attempts

This commit is contained in:
Jacob Peddicord
2010-04-05 08:45:37 -04:00
parent ce6c549263
commit 06ce1a2fa8

View File

@@ -88,6 +88,7 @@ def send_xmpp(data, signal, msg, trial=1):
w.prnt('', "Could send to XMPP server.") w.prnt('', "Could send to XMPP server.")
else: else:
w.prnt('', "Lost connection to XMPP server. Trying to send again... (trial %d)" % trial + 1) w.prnt('', "Lost connection to XMPP server. Trying to send again... (trial %d)" % trial + 1)
sleep(0.5)
send_xmpp(data, signal, msg, trial + 1) send_xmpp(data, signal, msg, trial + 1)
return w.WEECHAT_RC_OK return w.WEECHAT_RC_OK