From be36600327b47b93f8462bdf343c4c12f6c966b9 Mon Sep 17 00:00:00 2001 From: Dirk Klimpel <5740567+dklimpel@users.noreply.github.com> Date: Thu, 13 Apr 2023 13:28:55 +0200 Subject: Disable loading `RefreshTokenServlet` on workers (#15428) --- changelog.d/15428.bugfix | 1 + synapse/rest/client/login.py | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) create mode 100644 changelog.d/15428.bugfix diff --git a/changelog.d/15428.bugfix b/changelog.d/15428.bugfix new file mode 100644 index 0000000000..1083f00b81 --- /dev/null +++ b/changelog.d/15428.bugfix @@ -0,0 +1 @@ +Disable loading `RefreshTokenServlet` (`/_matrix/client/(r0|v3|unstable)/refresh`) on workers. \ No newline at end of file diff --git a/synapse/rest/client/login.py b/synapse/rest/client/login.py index b7e9c8f6b5..32c2f5ce0c 100644 --- a/synapse/rest/client/login.py +++ b/synapse/rest/client/login.py @@ -670,7 +670,10 @@ class CasTicketServlet(RestServlet): def register_servlets(hs: "HomeServer", http_server: HttpServer) -> None: LoginRestServlet(hs).register(http_server) - if hs.config.registration.refreshable_access_token_lifetime is not None: + if ( + hs.config.worker.worker_app is None + and hs.config.registration.refreshable_access_token_lifetime is not None + ): RefreshTokenServlet(hs).register(http_server) SsoRedirectServlet(hs).register(http_server) if hs.config.cas.cas_enabled: -- cgit 1.4.1