Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

consoles: Fix constant VNC reconnections when there is a password #2016

Merged
merged 1 commit into from
Feb 5, 2025

Conversation

mvollmer
Copy link
Member

@mvollmer mvollmer commented Feb 4, 2025

We would pass a new object to VncConsole.credentials on every render, which would trigger it to re-connect to the VNC server every time. This shows up as flicker in the UI, and will also eventually break the connection entirely, somehow.

We would pass a new object to VncConsole.credentials on every render,
which would trigger it to re-connect to the VNC server every time.
This shows up as flicker in the UI, and will also eventually break the
connection entirely, somehow.
@mvollmer mvollmer force-pushed the consoles-fix-reconnects branch from 1eb0306 to 241383e Compare February 4, 2025 11:20
@mvollmer mvollmer requested a review from jelly February 4, 2025 11:23
Copy link
Member

@martinpitt martinpitt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oops! Thanks! This feels like an use case for useRef(), but this should work fine as well.

@mvollmer
Copy link
Member Author

mvollmer commented Feb 5, 2025

Oops! Thanks! This feels like an use case for useRef(), but this should work fine as well.

It's a use case for useDeepEqualMemo, but this is unfortunately still a class component, not a function component.

@mvollmer mvollmer merged commit 170341a into cockpit-project:main Feb 5, 2025
26 of 28 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants