Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions src/_bentoml_impl/server/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
from bentoml._internal.marshal.dispatcher import CorkDispatcher
from bentoml._internal.resource import system_resources
from bentoml._internal.server.base_app import BaseAppFactory
from bentoml._internal.server.http.traffic import TimeoutMiddleware
from bentoml._internal.server.http_app import log_exception
from bentoml._internal.types import LazyType
from bentoml._internal.utils import is_async_callable
Expand Down Expand Up @@ -190,6 +191,8 @@ def build_path(*path_segments: str) -> str:
self.service.mount_asgi_app(create_proxy_app(self.service), name="proxy")

for mount_app, path, name in self.service.mount_apps:
if self.timeout is not None:
mount_app = TimeoutMiddleware(mount_app, timeout=self.timeout)
app.router.routes.append(PassiveMount(path, mount_app, name=name))

if self.is_main:
Expand Down