def release_serving(self):
        """Release the current serving (request and response)."""
        req = cherrypy.serving.request

        cherrypy.engine.publish('after_request')

        try:
            req.close()
        except Exception:
            cherrypy.log(traceback=True, severity=40)

        cherrypy.serving.clear()
Release the current serving (request and response).
cherrypy/_cptree.py