File tree 1 file changed +11
-4
lines changed
1 file changed +11
-4
lines changed Original file line number Diff line number Diff line change @@ -96,15 +96,22 @@ async function startIpfsWithLogs (ipfsd) {
96
96
97
97
const stopListening = listenToIpfsLogs ( ipfsd , data => {
98
98
logs += data . toString ( )
99
-
100
- isMigrating = isMigrating || logs . toLowerCase ( ) . includes ( 'migration' )
101
- isErrored = isErrored || logs . toLowerCase ( ) . includes ( 'error' )
102
- isFinished = isFinished || logs . toLowerCase ( ) . includes ( 'daemon is ready' )
99
+ const line = data . toLowerCase ( )
100
+ isMigrating = isMigrating || line . includes ( 'migration' )
101
+ isErrored = isErrored || line . includes ( 'error' )
102
+ isFinished = isFinished || line . includes ( 'daemon is ready' )
103
103
104
104
if ( ! isMigrating ) {
105
105
return
106
106
}
107
107
108
+ // Undo error state if retrying after HTTP failure
109
+ // https://github.com/ipfs/ipfs-desktop/issues/2003
110
+ if ( isErrored && line . includes ( 'fetching with ipfs' ) && ! line . includes ( 'error' ) ) {
111
+ isErrored = false
112
+ if ( migrationPrompt ) migrationPrompt . loadWindow ( logs , isErrored , isFinished )
113
+ }
114
+
108
115
if ( ! migrationPrompt ) {
109
116
logger . info ( '[daemon] ipfs data store is migrating' )
110
117
migrationPrompt = showMigrationPrompt ( logs , isErrored , isFinished )
You can’t perform that action at this time.
0 commit comments