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

When QueryConnect is enabled on x0vncserver, there may be exceptions when multiple connections are concurrent #1766

Open
Jathon-yang opened this issue Jun 18, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@Jathon-yang
Copy link

Jathon-yang commented Jun 18, 2024

When QueryConnect is enabled, if a connection is waiting for a user reply and a new connection enters, the program rejects it. As the authClientCount() is still 0 at this time, stopDesktop() will be executed, resulting in the first connection not responding. It is recommended to add an additional check to determine if there is a connection waiting.
It can be determined by adding an additional function.

Tigervnc/common/rfb/VNCServerST.cxx
The variable name on line 193 of the file is incorrect.

if (authClientCount() == 0) stopDesktop();
Should be changed to
if (authClientCount() == 0 && !desktop->isQueryConnect()) stopDesktop();

@CendioOssman
Copy link
Member

Thank you for your bug report!

We do indeed seem to have a race during the query phase. There are more parts here that look suspicious. I'll have a look.

@CendioOssman CendioOssman added the bug Something isn't working label Jun 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants