Merge "Don't use singleton in routes.middleware.RoutesMiddleware"

This commit is contained in:
Zuul 2021-09-07 02:39:06 +00:00 committed by Gerrit Code Review
commit b04d405487

View File

@ -200,8 +200,13 @@ class ExtensionMiddleware(base.ConfigurableMiddleware):
controller = req_controllers[request_ext.key]
controller.add_handler(request_ext.handler)
# NOTE(slaweq): It seems that using singleton=True in conjunction
# with eventlet monkey patching of the threading library doesn't work
# well and there is memory leak. See
# https://bugs.launchpad.net/neutron/+bug/1942179 for details
self._router = routes.middleware.RoutesMiddleware(self._dispatch,
mapper)
mapper,
singleton=False)
super(ExtensionMiddleware, self).__init__(application)
@classmethod