diff --git a/package.json b/package.json index a9237ab9..1097658e 100644 --- a/package.json +++ b/package.json @@ -107,5 +107,6 @@ "overrides": { "sharp": "0.35.0-rc.0" } - } + }, + "packageManager": "pnpm@10.33.0+sha512.10568bb4a6afb58c9eb3630da90cc9516417abebd3fabbe6739f0ae795728da1491e9db5a544c76ad8eb7570f5c4bb3d6c637b2cb41bfdcdb47fa823c8649319" } diff --git a/src/app/call/voice.ts b/src/app/call/voice.ts index 95cab6a5..07ab0648 100644 --- a/src/app/call/voice.ts +++ b/src/app/call/voice.ts @@ -277,7 +277,7 @@ export const joinVoiceRoom = async ( try { await Promise.race([ liveKitRoom.connect(server_url, participant_token, {maxRetries: 0}), - whenTimeout(5_000, { + whenTimeout(15_000, { message: "Connection timed out. Please check your network and try again.", }), whenAborted(signal), diff --git a/src/lib/util.ts b/src/lib/util.ts index 59f9fb21..4749ec00 100644 --- a/src/lib/util.ts +++ b/src/lib/util.ts @@ -46,7 +46,9 @@ export const whenAborted = (signal?: AbortSignal) => { /** Returns a promise that rejects with TimeoutError after ms. Use with Promise.race. */ export const whenTimeout = (ms: number, opts: {message?: string} = {}) => { - return new Promise((_, reject) => setTimeout(() => reject(new TimeoutError()), ms)) + return new Promise((_, reject) => + setTimeout(() => reject(new TimeoutError(opts.message)), ms), + ) } export const buildUrl = (base: string | URL, ...pathname: string[]) => {