From 687bc7a9aa04dec82854fe997a1bac1188819c91 Mon Sep 17 00:00:00 2001 From: CrescentLeaf Date: Sun, 19 Oct 2025 14:52:45 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8A=A0=E9=95=BF=20timeout=20=E6=97=B6?= =?UTF-8?q?=E9=97=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- client/api/Client.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/client/api/Client.ts b/client/api/Client.ts index d58db60..a423eda 100644 --- a/client/api/Client.ts +++ b/client/api/Client.ts @@ -42,7 +42,7 @@ class Client { } }) } - static invoke(method: CallMethod, args: object = {}, timeout: number = 5000, refreshAndRetryLimit: number = 3, forceRefreshAndRetry: boolean = false): Promise { + static invoke(method: CallMethod, args: object = {}, timeout: number = 10000, refreshAndRetryLimit: number = 3, forceRefreshAndRetry: boolean = false): Promise { // 在 未初始化 / 未建立连接且调用非可调用接口 的时候进行延迟 if (this.socket == null || (!this.connected && !CallableMethodBeforeAuth.includes(method))) { return new Promise((reslove) => { @@ -89,7 +89,7 @@ class Client { }) return re.data?.access_token as string } - static async auth(token: string, timeout: number = 5000) { + static async auth(token: string, timeout: number) { const re = await this.invoke("User.auth", { access_token: token }, timeout, 1, true)