diff options
author | R David Murray <rdmurray@bitdance.com> | 2015-04-05 19:26:29 -0400 |
---|---|---|
committer | R David Murray <rdmurray@bitdance.com> | 2015-04-05 19:26:29 -0400 |
commit | cae7bdb4241b928f9da025dce48ec98f1b63d576 (patch) | |
tree | 9aff2370b4a06f84fda13e48448023cc6506af17 /Python/pylifecycle.c | |
parent | 142bf565b4e095cfdf59dcb07f6480a7368f1d33 (diff) | |
download | cpython-git-cae7bdb4241b928f9da025dce48ec98f1b63d576.tar.gz |
#3566: Clean up handling of remote server disconnects.
This changeset does two things: introduces a new RemoteDisconnected exception
(that subclasses ConnectionResetError and BadStatusLine) so that a remote
server disconnection can be detected by client code (and provides a better
error message for debugging purposes), and ensures that the client socket is
closed if a ConnectionError happens, so that the automatic re-connection code
can work if the application handles the error and continues on.
Tests are added that confirm that a connection is re-used or not re-used
as appropriate to the various combinations of protocol version and headers.
Patch by Martin Panter, reviewed by Demian Brecht. (Tweaked only slightly by
me.)
Diffstat (limited to 'Python/pylifecycle.c')
0 files changed, 0 insertions, 0 deletions