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

main: Added quit on last client disconnect #309

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

cybin
Copy link

@cybin cybin commented May 21, 2024

I needed an option to automatically quit wayvnc when the last client disconnect.

Added a condition in client_destroy() and set self->server->do_exit to true, if condition is met.

For example, if wayvnc will only run intentionally by starting via SSH, it automatically
quit when I close the VNC connection and no other clients are connected.

@any1
Copy link
Owner

any1 commented May 21, 2024

Hi, have you read CONTRIBUTING.md?

@cybin
Copy link
Author

cybin commented May 21, 2024

Hi, have you read CONTRIBUTING.md?

Yes, I did. But obviously not to the very last line.

src/main.c Outdated Show resolved Hide resolved
src/main.c Outdated Show resolved Hide resolved
src/main.c Outdated Show resolved Hide resolved
@cybin
Copy link
Author

cybin commented Jun 3, 2024

Thanks for your help.

So, I'm going to rename everything to exit-on-disconnect and change 'q' to 'e' accordingly. Will push later today, when I got the time to test it.

@any1
Copy link
Owner

any1 commented Jun 8, 2024

LGTM. Please squash into single commit. Keep in mind that commit messages should be written in imperative mood. A commit message should complete the sentence "When applied, this patch will...".

I.e. "main: Added quit on last client disconnect" might be written "main: Add option to exit on last disconnect" instead.

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