-
-
Notifications
You must be signed in to change notification settings - Fork 86
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
Add graceful errors and graceful shutdowns #53
Comments
The closing of the client connections can be done in the handleInterrupt function in fac6e28 |
Accidentally closed it |
I was playing around with expanding the code that you had already written for this to include Essentially, a function is registered to be called once I can push the branch that I made while testing if you want to have a look. |
sure push it. I'm interested what the change looks like. Also nice find. |
Pushed the new branch: e879112 |
I was looking at this again the other day to see what it would take to finish this up. Shutting down the HTTP server is rather straight forward, however shutting down the RTMP server is a different story. It doesn't look like it's possible without handling packets manually, but I haven't been able to really dig into the library code all that much. I may just say "screw it" for the RTMP server stuff for now and just focus on the HTTP component. I've been wanting to get this done so I can properly daemonize the server. |
This would have 3 parts.
This can be a wrapper around errors.
Have the client send a ClientData object with a special type for name changing. The first successful name change means that the client can join the chat room, because it will be upgraded from a temporary connection. Apply this change to the
/nick
command too.Have movie night shutdown gracefully on ctrl+c with sending an error message saying something along the lines of "The server has been shut down". The code below can be used to have a graceful shutdown, that if it takes too long, just stops.
The text was updated successfully, but these errors were encountered: