Skip to content

Commit 5957f30

Browse files
committed
Recover from renderer failures
The setImmediate is apparently required, according to some old discussion from Electron, in some older versions (v7?) but it's not clear it was ever fixed to work in new ones either and it's hard to reproduce a renderer crash by definition so let's keep it just to be safe.
1 parent f6e7f37 commit 5957f30

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/index.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -212,6 +212,10 @@ if (!amMainInstance) {
212212
"UI crashed",
213213
"The HTTP Toolkit UI stopped unexpected.\n\nPlease file an issue at github.com/httptoolkit/httptoolkit."
214214
);
215+
216+
setImmediate(() => {
217+
contents.reload();
218+
});
215219
});
216220
});
217221

0 commit comments

Comments
 (0)