-
Notifications
You must be signed in to change notification settings - Fork 646
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
calling BlockingNettyContext.shutdown() does not clear handlers #90
Comments
The issue has more to do with the very currently limited lifecycle to be reworked. |
This commit further facilitates complete shutdown and restart of a server via the start/shutdown API offered through BlockingNettyContext. Calling shutdown() will now also shut down global resources, that is TcpResources and HttpResources.
I've updated the code sample in the original issue, and I can still reproduce the issue with the current 0.7.0 SNAPSHOT. Note that calling |
I faced the very same issue in Spring Fu (spring-projects-experimental/spring-fu@6be8b90) and I think that's a rather annoying one (it keeps the port open after closing the server) that deserves to be fixed before Spring Framework 5.1 / Spring Boot 2.1 release IMO. |
We should have the following fix in a next milestone/RC: |
Add address-matching ConnectionProvider#disposeWhen(SocketAddress). This will be used by global resource holders to selectively close stateful connection providers such as PooledConnectionProvider. Rename shutdown to disposeLoopsAndConnections to align with dispose semantics. Minor tweak to release state lifecycle in PooledConnectionProvider
I reopen this issue, I still see it in Spring Fu. To reproduce clone https://github.com/spring-projects/spring-fu, remove |
The issue still occurs with latest snapshot, if you want to debug that I have created a branch that reproduces the issue: https://github.com/spring-projects/spring-fu/tree/reactor-netty-http-resources. You can run for example |
As noticed by @violetagg, |
This issue is linked with spring-projects/spring-boot#9146
When trying to fix devtools support in Spring Boot (i.e. stopping the server, recreating a new Spring context and starting a new server - all that without stopping the JVM), I've found that disposing a server and starting a new one has not the expected behavior.
Here's a repro case that shows the behavior:
Am I misusing the
HttpServer
API?Is there some state that I forgot to clear?
The text was updated successfully, but these errors were encountered: