|
|
|
@ -305,9 +305,10 @@ async function openLive(stream) { |
|
|
|
return |
|
|
|
} |
|
|
|
|
|
|
|
opening = true |
|
|
|
try { |
|
|
|
await closeActiveLive() |
|
|
|
if (disposed) return |
|
|
|
opening = true |
|
|
|
const seq = ++openSeq |
|
|
|
try { |
|
|
|
const result = await joinLiveWithRetry(stream.dockId, {}, { |
|
|
|
@ -351,11 +352,13 @@ async function openLive(stream) { |
|
|
|
} catch (e) { |
|
|
|
if (seq !== openSeq || disposed || e?.code === 'ABORTED') return |
|
|
|
if (isLeaseInvalidError(e)) { |
|
|
|
opening = false // unlock before nested openLive via rejoin |
|
|
|
await rejoinAfterLeaseInvalid(stream.id, stream.dockId) |
|
|
|
return |
|
|
|
} |
|
|
|
await closeActiveLive() |
|
|
|
ui.toast(e.message || '打开直播失败') |
|
|
|
} |
|
|
|
} finally { |
|
|
|
opening = false |
|
|
|
} |
|
|
|
|