From 5bbed7e3fce104f7ced85fba4e7511c670c9f15c Mon Sep 17 00:00:00 2001 From: cr0hn Date: Wed, 1 Jun 2016 16:56:35 +0200 Subject: [PATCH] Update web.py Added backlog option to support more than 128 (default value in "create_server" function) concurrent connections. --- aiohttp/web.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/aiohttp/web.py b/aiohttp/web.py index 010f46b4899..9b3c9046627 100644 --- a/aiohttp/web.py +++ b/aiohttp/web.py @@ -294,7 +294,7 @@ def __repr__(self): def run_app(app, *, host='0.0.0.0', port=None, shutdown_timeout=60.0, ssl_context=None, - print=print): + print=print, backlog=128): """Run an app locally""" if port is None: if not ssl_context: @@ -306,7 +306,8 @@ def run_app(app, *, host='0.0.0.0', port=None, handler = app.make_handler() srv = loop.run_until_complete(loop.create_server(handler, host, port, - ssl=ssl_context)) + ssl=ssl_context, + backlog=backlog)) scheme = 'https' if ssl_context else 'http' print("======== Running on {scheme}://{host}:{port}/ ========\n"