'Invoke if trying to reconnect to a RabbitMQ server. Constructing the
Connection object should connect on its own.'

def connect(self):

    assert (self._connection_attempt_timer is None), 'connect    timer    was    already    scheduled'
    assert self.is_closed, 'connect    expected    CLOSED    state,    but    got:    {}'.format(self._STATE_NAMES[self.connection_state])
    self._set_connection_state(self.CONNECTION_INIT)
    self._connection_attempt_timer = self.add_timeout(0, self._on_connect_timer)
