'Invoked when the connection is closed to determine if the IOLoop
should be stopped or not.'

def _handle_ioloop_stop(self):

    if (self.stop_ioloop_on_close and self.ioloop):
        self.ioloop.stop()
    elif self.WARN_ABOUT_IOLOOP:
        LOGGER.warning('Connection    is    closed    but    not    stopping    IOLoop')
