]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
bpo-35017, socketserver: don't accept request after shutdown (GH-9952)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Fri, 26 Oct 2018 14:06:39 +0000 (07:06 -0700)
committerGitHub <noreply@github.com>
Fri, 26 Oct 2018 14:06:39 +0000 (07:06 -0700)
commit908082451382b8b3ba09ebba638db660edbf5d8e
tree0a982747637f3bb53b87c4ea0a2a5592eef7beb9
parent1487b651caa62647f8f8c9e8432e475e3566130c
bpo-35017, socketserver: don't accept request after shutdown (GH-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 10cb3760e8631a27f5db1e51b05494e29306c671)

Co-authored-by: Denis Ledoux <be.ledoux.denis@gmail.com>
Lib/socketserver.py
Misc/NEWS.d/next/Library/2018-10-26-00-11-21.bpo-35017.6Ez4Cv.rst [new file with mode: 0644]