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

Option to start the client and server as daemons #1201

Closed
wants to merge 2 commits into from

Conversation

newk5
Copy link
Contributor

@newk5 newk5 commented Nov 27, 2021

Description

Added a new setter to the client and server (.setDaemon), to be used before starting the client/server.
When set to true, all threads spawned by the server and client will be marked as daemon to allow for the exit of the application.

Related Issue

Fixes #888

Motivation and Context

I have an app that is using this library and whenever I closed the app I noticed it never exited, it kept running on the background despite closing the window. I found out the issue was caused by this library since threads spawned were not marked as daemon nor there was a way to specify it. I forked the library and fixed it and then I saw there was already an issue about it so I thought about contributing.

How Has This Been Tested?

I started a client and server and called .setDaemon(true) , then I closed the window of my app and it exited correctly instead of running itself on the background.

Types of changes

  • Bug fix
  • New feature
  • Breaking change

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@marci4
Copy link
Collaborator

marci4 commented Feb 4, 2024

Closing this PR in favour of #1390

@marci4 marci4 closed this Feb 4, 2024
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.

Use user-supplied ThreadFactory to create internal Server/Client threads
3 participants