Skip to content

Commit

Permalink
Remove auto reload on error (#46)
Browse files Browse the repository at this point in the history
  • Loading branch information
EddieAbbondanzio authored Apr 1, 2023
1 parent 3a783b6 commit 3fe3413
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 9 deletions.
3 changes: 1 addition & 2 deletions packages/marqus-desktop/src/main/index.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { app, BrowserWindow, ipcMain, session } from "electron";
import { getProcessType, isDevelopment, isTest } from "../shared/env";
import { sleep } from "../shared/utils";
import { initPlugins, IpcMainTS, IPC_PLUGINS, OnDispose } from "./ipc";
import { initPlugins, IpcMainTS, IPC_PLUGINS } from "./ipc";
import { getConfig } from "./ipc/plugins/config";
import { getFileTransport, logger } from "./logger";
import { setCspHeader } from "./utils";
Expand Down
7 changes: 0 additions & 7 deletions packages/marqus-desktop/src/renderer/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -90,13 +90,6 @@ export function App(props: AppProps): JSX.Element {

const onError = async (err: ErrorEvent) => {
await log.error("Uncaught Error:", err.error);

// N.B. We add a delay to slow down refreshes in case an infinite loop was
// somehow triggered.
setTimeout(async () => {
await log.info("Attempting to recover from error. Reloading!");
window.location.reload();
}, 10000);
};
window.addEventListener("error", onError);

Expand Down

0 comments on commit 3fe3413

Please sign in to comment.