diff options
author | Denis Ledoux <be.ledoux.denis@gmail.com> | 2018-10-26 17:15:22 +0200 |
---|---|---|
committer | Victor Stinner <vstinner@redhat.com> | 2018-10-26 17:15:22 +0200 |
commit | 6f97a50c86737458c6bed9970c8dc31a465eff22 (patch) | |
tree | 2c407526f34ebde18f0e2c94a319c3da7fa1ff6d /Misc | |
parent | 9dcb517f8ebba16a46ec2a6a97bb3e4a97daeae9 (diff) | |
download | cpython-git-6f97a50c86737458c6bed9970c8dc31a465eff22.tar.gz |
bpo-35017, socketserver: don't accept request after shutdown (GH-9952) (GH-10129)
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)
Diffstat (limited to 'Misc')
-rw-r--r-- | Misc/NEWS.d/next/Library/2018-10-26-00-11-21.bpo-35017.6Ez4Cv.rst | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Misc/NEWS.d/next/Library/2018-10-26-00-11-21.bpo-35017.6Ez4Cv.rst b/Misc/NEWS.d/next/Library/2018-10-26-00-11-21.bpo-35017.6Ez4Cv.rst new file mode 100644 index 0000000000..5682717adf --- /dev/null +++ b/Misc/NEWS.d/next/Library/2018-10-26-00-11-21.bpo-35017.6Ez4Cv.rst @@ -0,0 +1,3 @@ +:meth:`socketserver.BaseServer.serve_forever` now exits immediately if it's +:meth:`~socketserver.BaseServer.shutdown` method is called while it is +polling for new events. |