Allow timeout of 0 for WSGIServer - #1528
Conversation
|
I don't think the test-fail has anything to do with this PR, does it? |
| # 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.
Could you please extend existing tests with corresponding test cases for negative/positive testing?
There was a problem hiding this comment.
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.
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.
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.
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.