Skip to content

Commit

Permalink
fix(suite-desktop-core): don't fail hard if http-receiver port is occ…
Browse files Browse the repository at this point in the history
…upied
  • Loading branch information
martykan committed Nov 25, 2024
1 parent 2e1fa63 commit 21ec6ac
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions packages/suite-desktop-core/src/modules/http-receiver.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,17 @@ export const initBackground: ModuleInitBackground = ({ mainWindowProxy, mainThre
}

logger.info(SERVICE_NAME, 'Starting server');
await receiver.start();

return receiver.getInfo();
try {
await receiver.start();

return receiver.getInfo();
} catch (error) {
// Don't fail hard if the server can't start
logger.error(SERVICE_NAME, 'Failed to start server: ' + error);

return null;
}
};

const onQuit = async () => {
Expand Down

0 comments on commit 21ec6ac

Please sign in to comment.