Skip to content

Commit

Permalink
Update web.py (#892)
Browse files Browse the repository at this point in the history
Added backlog option to support more than 128 (default value in "create_server" function) concurrent connections.
  • Loading branch information
cr0hn authored and asvetlov committed Jul 12, 2016
1 parent 25cbc1d commit 2ea5821
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions aiohttp/web.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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"
Expand Down

0 comments on commit 2ea5821

Please sign in to comment.