Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add documentation for new Timeout values, after #939 #975

Merged
merged 1 commit into from
Oct 16, 2017

Conversation

ashleysommer
Copy link
Member

Add documentation for REQUEST_TIMEOUT, RESPONSE_TIMEOUT and KEEP_ALIVE_TIMEOUT config values.

Fixed some inconsistent default values.

…E_TIMEOUT config values.

Fixed some inconsistent default values.
@@ -76,7 +76,7 @@ class HttpProtocol(asyncio.Protocol):

def __init__(self, *, loop, request_handler, error_handler,
signal=Signal(), connections=set(), request_timeout=60,
response_timeout=60, keep_alive_timeout=15,
response_timeout=60, keep_alive_timeout=5,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's the motivation for changing this?

Copy link
Member Author

@ashleysommer ashleysommer Oct 16, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That is to keep all of the keep_alive_timeout default values the same.
In #939 I had:
Config.KEEP_ALIVE_TIMEOUT=5 in config.py
keep_alive_timeout=60 in server.py serve()
keep_alive_timeout=15 in HttpProtocol.__init__()

By default the Config.KEEP_ALIVE_TIMEOUT value was used and passed through to the others, so the 60 and the 15 were never used.

I changed them to 5 to be consistent with the default config value, and the documentation.

@r0fls r0fls merged commit c5cdcf0 into sanic-org:master Oct 16, 2017
@seemethere seemethere modified the milestones: 0.6.1, 0.7.0 Nov 13, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants