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 | 424cef7b4e30453d221dba5c5282e0cf7e40e60c (patch) | |
tree | e05d0717728ab010e562f46ec99b81a4eae4be54 /Python/pylifecycle.c | |
parent | 9c307fd49559b34beab7bdf382ea16e11b97eb19 (diff) | |
download | cpython-424cef7b4e30453d221dba5c5282e0cf7e40e60c.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