def ioloop(connection, name=None):
    # Loop until CTRL-C
    if name:
        name = name % "NODE-%s"

    import threading
    threading.current_thread().name = name or "NODE"
    try:
        # Start our blocking loop
        log.debug("ioloop: Before start")
        connection.ioloop.start()
        log.debug("ioloop: After start")

    except KeyboardInterrupt:

        log.debug("Got keyboard interrupt")

        # Close the connection
        connection.close()

        # Loop until the connection is closed
        connection.ioloop.start()
dataset/ETHPy150Open ooici/pyon/pyon/net/messaging.py/ioloop/swapped operands of `%`