Repository navigation
udp: do not close listen socket after stop listening - #19146
Conversation
Signed-off-by: Dan Zhang <[email protected]>
Signed-off-by: Dan Zhang <[email protected]>
Signed-off-by: Dan Zhang <[email protected]>
RyanTheOptimist
left a comment
There was a problem hiding this comment.
Thanks for doing this!
There was a problem hiding this comment.
nit: Since we have this (almost) identical block of logic twice, could we have a method like maybeCloseAllSockets(ListenerImplPtr listener) which wraps this?
There was a problem hiding this comment.
Woo hoo!
Would it make sense to try to write a unit test for the new logic in source/server/listener_manager_impl.cc?
Signed-off-by: Dan Zhang <[email protected]>
Signed-off-by: Dan Zhang <[email protected]>
Signed-off-by: Dan Zhang <[email protected]>
|
/retest |
|
Retrying Azure Pipelines: |
RyanTheOptimist
left a comment
There was a problem hiding this comment.
Looks good. Any idea what's up with the failed tests? Flakes, perhaps?
|
coverage and api CIs failed in my other PRs as well, the failing test kill_request:kill_request_filter_integration_test is not related to this change. |
Signed-off-by: Dan Zhang <[email protected]>
|
CI failures are gone after sync'ing with HEAD. PTAL |
|
/assign @alyssawilk |
|
/assign @mattklein123 |
alyssawilk
left a comment
There was a problem hiding this comment.
Lgtm modulo minor comment nits
| if (!listener.udpListenerConfig().has_value() || | ||
| listener.udpListenerConfig()->listenerFactory().isTransportConnectionless()) { | ||
| // Close the listen socket right away to avoid leaving TCP connections in accept queue | ||
| // already waiting for long timeout. However, connection-oriented UDP listener shouldn't |
There was a problem hiding this comment.
nit: UDP listener -> UDP listeners
| listener.udpListenerConfig()->listenerFactory().isTransportConnectionless()) { | ||
| // Close the listen socket right away to avoid leaving TCP connections in accept queue | ||
| // already waiting for long timeout. However, connection-oriented UDP listener shouldn't | ||
| // close the socket because it needs to receive packets on existing connection via the |
There was a problem hiding this comment.
it needs to -> they need to
on existing connection -> for existing connections
Signed-off-by: Dan Zhang <[email protected]>
|
ping @mattklein123 |
|
I think Matt it out on paternity leave. Once alyssa is happy, I think we should be good to go? |
mattklein123
left a comment
There was a problem hiding this comment.
Cool, thanks for the back and forth discussion on this one. I think this is the right fix.
Commit Message: After stopListener(), only close all the listen socket of that listen if the listener is not quic.
Risk Level: low, only quic is affected
Testing: re-enabled QuicHttpIntegrationTest::AdminDrainDrainsListeners, added unit test
Fixes #19006