-
-
Notifications
You must be signed in to change notification settings - Fork 369
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 timeout of 0 for WSGIServer #1528
Conversation
I don't think the test-fail has anything to do with this PR, does it? |
@@ -1695,7 +1695,7 @@ def stop(self, timeout=5): | |||
|
|||
# Don't join currentThread (when stop is called inside a request). | |||
current = threading.currentThread() | |||
if timeout and timeout >= 0: | |||
if timeout is not None and timeout >= 0: |
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.
Could you please extend existing tests with corresponding test cases for negative/positive testing?
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.
Oke, in which file would that be? I opened all the ones related to wsgiserver
but didn't see things related to startup/shutdown.
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.
I don't know. It's needed to check tests. Make your suggestion. You may even need to add some new test suite.
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.
I really don't understand the existing tests sets and where to even begin adding this. I want to help, but this is a bit too much..
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.
Okay, I'll try looking into this myself :)
CP change to fix bug submitted as PR: cherrypy/cherrypy#1528
CP change to fix bug submitted as PR: cherrypy/cherrypy#1528
I don't think there are yet such tests. Given that, I'm inclined to accept this change without tests. If the CherryPy maintainers aren't willing to develop the tests for basic functionality, I don't think we should impose that burden on contributors willing to make minor improvements. @Safihre Can you at least provide a transcript demonstrating the use of this new feature and that it works? |
@jaraco Of course: cherrypy.config.update({
'server.shutdown_timeout': 0,
}) Without the change the assignment of
With this change correct and instant shutdown:
|
No description provided.