]> granicus.if.org Git - python/commit
#5713: Handle 421 error codes during sendmail by closing the socket.
authorR David Murray <rdmurray@bitdance.com>
Thu, 21 Mar 2013 00:36:14 +0000 (20:36 -0400)
committerR David Murray <rdmurray@bitdance.com>
Thu, 21 Mar 2013 00:36:14 +0000 (20:36 -0400)
commitd312c740f15b2ee8ba242fb779884f7e19b28a7e
tree1f5ed34172138c7e5a916e6b964e0bda5b16821c
parent958f7ae8651bb6347a0401fe9db7d0a219daf156
#5713: Handle 421 error codes during sendmail by closing the socket.

This is a partial fix to the issue of servers disconnecting unexpectedly; in
this case the 421 says they are disconnecting, so we close the socket and
return the 421 in the appropriate error context.

Original patch by Mark Sapiro, updated by Kushal Das, with additional
tests by me.
Lib/smtplib.py
Lib/test/test_smtplib.py
Misc/NEWS