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

[2.7] bpo-35017, socketserver: don't accept any request after shutdown (GH-9952) #10129

Merged
merged 1 commit into from Oct 26, 2018

Conversation

beledouxdenis
Copy link
Contributor

@beledouxdenis beledouxdenis commented Oct 26, 2018

Prior to this revision, after the shutdown of a BaseServer,
the server accepted a last single request
if it was sent between the server socket polling
and the polling timeout.

This can be problematic for instance for a server restart
for which you do not want to interrupt the service,
by not closing the listening socket during the restart.
One request failed because of this behavior.

Note that only one request failed,
following requests were not accepted, as expected.

(cherry picked from commit 10cb376)

https://bugs.python.org/issue35017

…H-9952)

Prior to this revision, after the shutdown of a `BaseServer`,
the server accepted a last single request
if it was sent between the server socket polling
and the polling timeout.

This can be problematic for instance for a server restart
for which you do not want to interrupt the service,
by not closing the listening socket during the restart.
One request failed because of this behavior.

Note that only one request failed,
following requests were not accepted, as expected.

(cherry picked from commit 10cb376)
Copy link
Member

@vstinner vstinner left a comment

Choose a reason for hiding this comment

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

LGTM.

@vstinner vstinner changed the title [2.7] bpo-35017: Lib/socketserver, do not accept any request after shutdown (GH-9952) [2.7] bpo-35017, socketserver: don't accept any request after shutdown (GH-9952) Oct 26, 2018
@vstinner vstinner merged commit 6f97a50 into python:2.7 Oct 26, 2018
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.

None yet

4 participants