File tree Expand file tree Collapse file tree 1 file changed +12
-5
lines changed
Expand file tree Collapse file tree 1 file changed +12
-5
lines changed Original file line number Diff line number Diff line change @@ -559,13 +559,20 @@ export const showRootWindow = async (): Promise<void> => {
559559 await session . clearStorageData ( {
560560 storages : [ 'shadercache' , 'cachestorage' ] ,
561561 } ) ;
562+
563+ if ( recoveryResetTimer ) {
564+ clearTimeout ( recoveryResetTimer ) ;
565+ recoveryResetTimer = null ;
566+ }
567+
568+ browserWindow . webContents . once ( 'did-finish-load' , ( ) => {
569+ recoveryResetTimer = setTimeout ( ( ) => {
570+ rendererRecoveryAttempts = 0 ;
571+ } , RECOVERY_RESET_DELAY_MS ) ;
572+ } ) ;
573+
562574 console . log ( 'Cache cleared. Reloading window...' ) ;
563575 browserWindow . reload ( ) ;
564-
565- if ( recoveryResetTimer ) clearTimeout ( recoveryResetTimer ) ;
566- recoveryResetTimer = setTimeout ( ( ) => {
567- rendererRecoveryAttempts = 0 ;
568- } , RECOVERY_RESET_DELAY_MS ) ;
569576 } catch ( error ) {
570577 console . error ( 'Failed to recover from crash:' , error ) ;
571578 app . quit ( ) ;
You can’t perform that action at this time.
0 commit comments