while not offline and node[0] != stm.rpc.url and len(node) > 1:
        node = node[1:] + [node[0]]