You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# Connect to the serverfromtimeimportsleeptries_delay=5max_tries=3tries=range(max_tries)
connected=Falsefortries_remainingintries:
ifself._bot.connect(self._host, self._port):
connected=Truebreakelse:
sleep(tries_delay)
ifconnected==False:
# if not self._bot.connect(self._host, self._port):_logger.error("Can't connect to the XMPP server at %s port %s",
self._host, self._port)
The text was updated successfully, but these errors were encountered:
Another solution could be to use a third argument in self._bot.connect(), which is reattempt (boolean).
In this case, it would also be necessary to add a reconnect_max_attempts member to the self._bot object to control the number of attempts.
self._bot.reconnect_max_attempts=3ifnotself._bot.connect(self._host, self._port, True):
_logger.error("Can't connect to the XMPP server at %s port %s",
self._host, self._port)
Line: 162
https://github.com/isandlaTech/cohorte-herald/blob/master/python/herald/transports/xmpp/transport.py#L162
Fix by something like that one:
The text was updated successfully, but these errors were encountered: