Skip to content

Commit

Permalink
Merge pull request #819 from imobachgs/fix-client-initialization
Browse files Browse the repository at this point in the history
Fix client initialization
  • Loading branch information
imobachgs authored Oct 26, 2023
2 parents 55010d7 + 9863c71 commit 320b580
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
6 changes: 6 additions & 0 deletions web/package/cockpit-agama.changes
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
-------------------------------------------------------------------
Thu Oct 26 05:31:28 UTC 2023 - Imobach Gonzalez Sosa <[email protected]>

- Fix client initialization to avoid a useless reconnection
(gh#openSUSE/agama#819).

-------------------------------------------------------------------
Mon Oct 23 11:33:53 UTC 2023 - Imobach Gonzalez Sosa <[email protected]>

Expand Down
1 change: 1 addition & 0 deletions web/src/context/installer.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ function InstallerClientProvider({
if (await client.isConnected()) {
setValue(client);
setAttempt(0);
return;
}

console.warn(`Failed to connect to D-Bus (attempt ${attempt + 1})`);
Expand Down
2 changes: 1 addition & 1 deletion web/src/context/installer.test.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ describe("installer context", () => {
<InstallerClientProvider interval={0.1}>
<ClientStatus />
</InstallerClientProvider>);
await screen.findByText("attempt: 2");
await screen.findByText("attempt: 1");
});
});

Expand Down

0 comments on commit 320b580

Please sign in to comment.