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

[http] pre-shutdown: how to refuse new connection while finishing on going stuff #416

Closed
quazardous opened this issue Jul 24, 2021 · 2 comments
Labels

Comments

@quazardous
Copy link

hi,

I'm wondering how I can tell the server to stop listening and opening new connection but to finish ongoing request.

I want to gracefully stop/start each servers and let the loadbalancer know that this server is down (refuse new connection).

just calling $loop->stop() ?

@WyriHaximus
Copy link
Member

Use the React\Socket\Server::close method for that. That will make your application stop listening for any new connections but still handle any ongoing.

@clue clue added the question label Jul 25, 2021
@clue
Copy link
Member

clue commented Jul 25, 2021

I believe this has been answered, so I'm closing this for now. Please come back with more details if this problem persists and we can always reopen this 👍

(Also refs #396 for a similar use case.)

@clue clue closed this as completed Jul 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants