'close the connection and stop the ioloop'

def stop(self):

    self.logger.info('Stopping    test')
    if (self.timeout is not None):
        self.connection.remove_timeout(self.timeout)
        self.timeout = None
    self.connection.close()
