From 169c1ba7d5f7d2a94e9fce825338da65991a385a Mon Sep 17 00:00:00 2001 From: cmyui Date: Sun, 7 Jul 2024 06:01:03 -0400 Subject: [PATCH] fix slow shutdown --- entrypoint.sh | 2 +- src/adapters/akatsuki-api/authentication.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/entrypoint.sh b/entrypoint.sh index 506b06f..f3437dd 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -23,4 +23,4 @@ fi /usr/share/nginx/html/injectEnv.sh -nginx -g "daemon off;" +exec nginx -g "daemon off;" diff --git a/src/adapters/akatsuki-api/authentication.ts b/src/adapters/akatsuki-api/authentication.ts index 7ab5e0d..97ba749 100644 --- a/src/adapters/akatsuki-api/authentication.ts +++ b/src/adapters/akatsuki-api/authentication.ts @@ -14,7 +14,7 @@ export const authenticate = async ( request: AuthenticateRequest ): Promise => { const response = await authApiInstance.post("/api/v1/authenticate", request) - if (response.status >= 400) { + if (response.status < 200 || response.status >= 300) { throw new Error(response.data) } const responseData = JSON.parse(response.data)