Closed ecton closed 1 year ago
Thanks for the PR! Have you tried instead using the existing Endpoint::set_server_config
interface to accomplish this in your application?
@Ralith maybe we can pass a bool
to wait_idle()
that takes care of the TransportConfig
trick? I agree that the existing method is fairly hard to discover and not very intuitive.
maybe we can pass a bool to
wait_idle()
That doesn't seem very discoverable either, TBH. After discussion I think this is fine.
Closes #1584
This commit adds a new function that refuses new connections without impacting existing connections. Internally, this just sets the connection limit to 0, which causes incoming connections to be rejected. This is the same approach that was taken in 0.8.5 when
Incoming
was dropped.Let me know if I should also add a unit test to the
quinn
crate. Since it's a simple pass-through, I elected not to initially.