'Stops the server (registered with atexit).'

def stop(self):

    try:
        atexit._exithandlers.remove((self.stop, (), {}))
    except:
        pass
    cp.engine.exit()
    sys.stdout = sys.__stdout__
    self._host = None
    self._port = None
    self._app = None
    self._up = False
