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

Server should report that it can be stopped by pressing enter #73

Open
CSchoel opened this issue Jun 28, 2021 · 3 comments
Open

Server should report that it can be stopped by pressing enter #73

CSchoel opened this issue Jun 28, 2021 · 3 comments
Assignees
Labels
documentation Improvements or additions to documentation
Milestone

Comments

@CSchoel
Copy link
Contributor

CSchoel commented Jun 28, 2021

I just found this out by accident, because i was using CTRL-C and was wondering if there wasn't a better way to gracefully shutdown the server. There should be a short info in the logs about this behavior and it should also be mentioned in the README.

@CSchoel CSchoel added the documentation Improvements or additions to documentation label Jun 28, 2021
@CSchoel
Copy link
Contributor Author

CSchoel commented Jun 28, 2021

Also I just found out that you cannot stop the server right after it was started and before any clients were connected. Maybe this should be fixed in #53 .

@manuEbg
Copy link
Contributor

manuEbg commented Jul 3, 2021

I think the Server should not be able to be stopped by pressing enter.
This was just an fast solution to prevent the Server Thread from terminating.
I also think this should be fixed in #53

@manuEbg manuEbg added this to the Prototype 3 milestone Jul 3, 2021
@manuEbg manuEbg assigned IlmarB and unassigned manuEbg Jul 3, 2021
@CSchoel
Copy link
Contributor Author

CSchoel commented Jul 5, 2021

Hm, interesting point. I also pondered, if there is a more proper way to shutdown the server process without any input from the client - because I believe there should be a way so that the server can be used even with a client that is not well-behaved.

The thing is that the "correct" way would be reacting to SIGINT (CTRL+C). This can be a little tricky and so I did not want to burden you with this. But after a quick research I think it should be very doable with a shutdown hook.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

3 participants