-
Notifications
You must be signed in to change notification settings - Fork 652
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
Connections are not disposed when server is closed #495
Comments
Interestingly this is a costly thing to do and thats why Netty doesnt do it by default. |
Looking a bit further, Netty will mark the channels as closing if we shutdown the worker loops from the server (which we don't because they can be shared). I wonder if we should force such shutdown when a server is disposed (and let LoopResources rehydrate new loops for following use). |
…ableServer#dispose When using the server with the default Tcp/HttpResources, when the server is disposed, they also will be disposed thus the children channels will be closed also.
Does this mean we expect outstanding connections to be abruptly terminated when a server is disposed? If so, should we consider adding support for graceful shutdown with connection draining? |
@dconnelly We plan to shutdown the |
@violetagg This is what I was hoping would happen thanks for the confirmation. Default values (2 second quiet period, 15 second timeout) are fine for my use case at least. |
Approach with channel group will be implemented for TCP/HTTP server (as described here for the client): As a workaround for now - This issue will depend on #586 152476f is a test case using |
This doesn't work due to a Reactor Netty bug. See reactor/reactor-netty#495
Feature is made available as part of #1022 |
Expected behavior
Connections are disposed on
DisposableServer.disposeNow()
, andConnection.onDispose()
Publisher is terminatedActual behavior
Connection.onDispose()
Publisher is not terminatedSteps to reproduce
Code below is timing out
Reactor Netty version
0.8.2.RELEASE
JVM version (e.g.
java -version
)Java(TM) SE Runtime Environment (build 1.8.0_191-b12)
Java HotSpot(TM) 64-Bit Server VM (build 25.191-b12, mixed mode)
OS version (e.g.
uname -a
)Linux desktop 4.4.0-138-generic #164~14.04.1-Ubuntu SMP Fri Oct 5 08:56:16 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
The text was updated successfully, but these errors were encountered: