Could you do this by changing listen()?

On Tue, Oct 18, 2016 at 11:42 AM, Yury Selivanov <> wrote:
> Hi,
> No, I don’t think we have an API for that.  I suppose you can make a PR (or 
> open an issue) at proposing to add 
> `pause_serving()`/`resume_serving()`.  I’m afraid we aren’t going to add them 
> until 3.7, since Python 3.6 is in feature freeze mode now.
> Yury
>> On Oct 18, 2016, at 2:39 PM, Justin Mayfield <> wrote:
>> Is there a public interface for controlling the connection limit on servers 
>> created with `loop.create_server`?  Specifically a way to ~ 
>> `remove_reader(_accept_connection)` temporarily.
>> I've developed a statsd proxy for a client that needs to implement 
>> backpressure all the way to the listening socket but I don't see a good way 
>> to pause the _accept_connection handler that monitors the listening socket 
>> for read events.
>> I'd be happy to implement my own logic for the back pressure using a public 
>> `pause_serving()`/`resume_serving()` API but a simple `max_connections` 
>> param to the create_server would suffice too.
>> Cheers,
>> JM

--Guido van Rossum (

Reply via email to