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

Add method to stop HttpSever #1280

Closed
wants to merge 1 commit into from

Conversation

bbourdel
Copy link

@bbourdel bbourdel commented Nov 8, 2017

Done : Add function close() to HttpServer class.
It closes the connection when the last TCP connection is closed.

To do : free all RAM (heap) taken when HTTP server is created (about 50% is freed now, 50 other % is still losed).

Have to be improved to free all RAM (heap) taken when HTTP server is created.
@slaff
Copy link
Contributor

slaff commented Nov 8, 2017

@bbourdel There should be code that prevents opening new connections if the server is not active. Also the code relies on the fact that all connections will close themselves. If you have a Websocket connection then the waiting can be quite long. It would be better to stop accepting new connections, get all open connections, close them first, and when all are reported closed to shutdown the server.

@slaff
Copy link
Contributor

slaff commented Nov 9, 2017

The changes from this PR will be merged with rebase #1284.

@slaff slaff closed this Nov 9, 2017
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