feat: reset recording state

This commit is contained in:
karishmas6
2024-10-12 22:19:38 +05:30
parent 363a396c86
commit deaaa7d85c

View File

@@ -249,15 +249,15 @@ async function readyForRunHandler(browserId: string, id: string) {
if (result && result.success) {
logger.log('info', `Interpretation of ${id} succeeded`);
resetRecordingState(browserId, id);
return result.interpretationInfo;
} else {
logger.log('error', `Interpretation of ${id} failed`);
await destroyRemoteBrowser(browserId);
resetRecordingState(browserId, id);
return null;
}
resetRecordingState(browserId, id);
} catch (error: any) {
logger.error(`Error during readyForRunHandler: ${error.message}`);
await destroyRemoteBrowser(browserId);