-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
allow disabling keep alive #646
Conversation
sanic/server.py
Outdated
|
||
@property | ||
def keep_alive(self): | ||
return self.parser.should_keep_alive() and not self.signal.stopped | ||
return (self.parser.should_keep_alive() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@property
def keep_alive(self):
return (not self._no_keep_alive
and not self.signal.stopped
and self.parser.should_keep_alive())
Would be better?
Well this does get loaded from config here: https://github.com/channelcat/sanic/pull/646/files#diff-c4444a35dbd5e37ee480b0e8888e0880R682 How does #639 apply exactly? |
I am sorry. |
Do we think the variable makes more sense as just |
No, just I did not read config.py. |
About #639, it occurred when I implemented a similar test. |
I am sorry for changing my opinion. |
No worries, I think I agree so better late than never :) I'll update it to use that... |
Thanks. |
I think that it is better to add tests for that |
My English is not good. |
No you're English is fine. I'm just traveling. I'll try to add the test soon thank you. If you have an idea for it in mind you can put it here otherwise I'll plan to do it soon... |
Thanks. |
Fixes: #637