Skip to content

Check/recheck connection to XMPP server #13

@debbabi

Description

@debbabi

Line: 162
https://github.com/isandlaTech/cohorte-herald/blob/master/python/herald/transports/xmpp/transport.py#L162

Fix by something like that one:

        # Connect to the server
        from time import sleep
        tries_delay = 5
        max_tries = 3
        tries = range(max_tries)
        connected = False
        for tries_remaining in tries:
            if self._bot.connect(self._host, self._port):
                connected = True
                break
            else:
                sleep(tries_delay)
        if connected == 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)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions