mirror of
https://github.com/ksyasuda/SubMiner.git
synced 2026-09-12 17:16:20 -07:00
fix(anki): prevent media timing review hangs and invalid ranges
- Reject stale or invalid timing actions - Fall back to original timing when the renderer stops responding
This commit is contained in:
@@ -290,6 +290,7 @@ export class MediaTimingPreviewSession {
|
||||
settled = true;
|
||||
clearAttemptTimeout();
|
||||
socket.off('connect', onConnect);
|
||||
socket.on('error', () => {});
|
||||
socket.destroy();
|
||||
reject(error);
|
||||
};
|
||||
@@ -301,6 +302,7 @@ export class MediaTimingPreviewSession {
|
||||
timeout = null;
|
||||
socket.off('connect', onConnect);
|
||||
socket.off('error', onError);
|
||||
socket.on('error', () => {});
|
||||
socket.destroy();
|
||||
reject(new Error('Timed out connecting to the hidden mpv preview player'));
|
||||
}, timeoutMs);
|
||||
|
||||
Reference in New Issue
Block a user