Skip to content

Commit

Permalink
ignore failed to update plugins because of server disconnect
Browse files Browse the repository at this point in the history
Summary:
To silence oocasional un actionable tasks
With such [logview](https://www.internalfb.com/logview/flipper_javascript/4e49a576ccc0f767c96cfbdbdc7d1123?trace_key=41bdca6a219d4800f091a662b5ce1405&trace_tab=shared&ds=%7B%22start%22%3A%22-1%20day%22%2C%22end%22%3A%22now%22%7D)

Reviewed By: mweststrate

Differential Revision: D62638786

fbshipit-source-id: ee8c1ff5a390061a9def4b7dfe7faf4ba0185760
  • Loading branch information
antonk52 authored and facebook-github-bot committed Sep 13, 2024
1 parent e3d7b23 commit b610a4a
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions desktop/flipper-ui/src/dispatcher/pluginManager.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -66,13 +66,15 @@ export default (
},
) => {
// This needn't happen immediately and is (light) I/O work.
if (window.requestIdleCallback) {
window.requestIdleCallback(() => {
refreshInstalledPlugins(store).catch((err) =>
console.error('Failed to refresh installed plugins:', err),
);
window.requestIdleCallback?.(() => {
refreshInstalledPlugins(store).catch((err: Error) => {
if (err.toString().includes('Not connected to Flipper server')) {
console.warn('Failed to refresh installed plugins:', err);
} else {
console.error('Failed to refresh installed plugins:', err);
}
});
}
});

let running = false;
const unsubscribeHandlePluginCommands = sideEffect(
Expand Down

0 comments on commit b610a4a

Please sign in to comment.