fix(web): propagate mounted timeouts across chat stream and edge-fetch awaits
This commit is contained in:
parent
c68e81e0aa
commit
4bf0f0df12
7 changed files with 363 additions and 106 deletions
|
|
@ -11,6 +11,7 @@ import {
|
|||
createTimedAbortSignal,
|
||||
resolveSupabaseFunctionUrl,
|
||||
scheduleTrackedTimeout,
|
||||
shouldExitAfterAwait,
|
||||
} from '@/lib/edge-fetch'
|
||||
import { getSupabaseBrowserClient } from '@/lib/supabase-browser'
|
||||
|
||||
|
|
@ -43,7 +44,7 @@ export function PaypleManageButton(): React.ReactElement {
|
|||
try {
|
||||
const supabase = getSupabaseBrowserClient()
|
||||
const { data: { session }, error: sessionError } = await supabase.auth.getSession()
|
||||
if (!mountedRef.current || timedAbort.controller.signal.aborted) return
|
||||
if (shouldExitAfterAwait(timedAbort, () => mountedRef.current)) return
|
||||
|
||||
if (sessionError || !session) {
|
||||
setError('로그인이 필요합니다')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue