diff --git a/CHANGES.txt b/CHANGES.txt index 2215962f3a3..37483f38992 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -73,6 +73,10 @@ CHANGES - Add tutorial +- Add backlog option to support more than 128 (default value in + "create_server" function) concurrent connections #892 + + 0.21.6 (05-05-2016) ------------------- diff --git a/CONTRIBUTORS.txt b/CONTRIBUTORS.txt index 40008a7da3b..202168346cf 100644 --- a/CONTRIBUTORS.txt +++ b/CONTRIBUTORS.txt @@ -29,6 +29,7 @@ Chien-Wei Huang Chih-Yuan Chen Chris Laws Chris Moore +Daniel GarcĂ­a Daniel Nelson David Michael Brown Dima Veselov diff --git a/aiohttp/web.py b/aiohttp/web.py index 9b3c9046627..753be841371 100644 --- a/aiohttp/web.py +++ b/aiohttp/web.py @@ -306,7 +306,7 @@ 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' diff --git a/docs/web_reference.rst b/docs/web_reference.rst index 601af50638b..adb3824bd2e 100644 --- a/docs/web_reference.rst +++ b/docs/web_reference.rst @@ -1744,7 +1744,7 @@ Utilities .. function:: run_app(app, *, host='0.0.0.0', port=None, loop=None, \ shutdown_timeout=60.0, ssl_context=None, \ - print=print) + print=print, backlog=128) An utility function for running an application, serving it until keyboard interrupt and performing a @@ -1780,6 +1780,10 @@ Utilities :param print: a callable compatible with :func:`print`. May be used to override STDOUT output or suppress it. + :param int backlog: the number of unaccepted connections that the + system will allow before refusing new + connections (``128`` by default). + Constants ---------