summaryrefslogtreecommitdiffstats
path: root/Lib/imaplib.py
diff options
context:
space:
mode:
authorAntoine Pitrou <solipsis@pitrou.net>2010-11-09 23:10:33 (GMT)
committerAntoine Pitrou <solipsis@pitrou.net>2010-11-09 23:10:33 (GMT)
commitd79f3c8b3a544de869e01d8f229f114d7eb2dfa8 (patch)
tree5f0bbdb7c1d1b0255829f36309f43a267eb640c3 /Lib/imaplib.py
parentb1436f185dac249f0f6dc342b2a543ae2d1db63d (diff)
downloadcpython-d79f3c8b3a544de869e01d8f229f114d7eb2dfa8.zip
cpython-d79f3c8b3a544de869e01d8f229f114d7eb2dfa8.tar.gz
cpython-d79f3c8b3a544de869e01d8f229f114d7eb2dfa8.tar.bz2
Issue #4471: Properly shutdown socket in IMAP.shutdown(). Patch by
Lorenzo M. Catucci.
Diffstat (limited to 'Lib/imaplib.py')
-rw-r--r--Lib/imaplib.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/Lib/imaplib.py b/Lib/imaplib.py
index 1b37546..e020747 100644
--- a/Lib/imaplib.py
+++ b/Lib/imaplib.py
@@ -260,6 +260,7 @@ class IMAP4:
def shutdown(self):
"""Close I/O established in "open"."""
self.file.close()
+ self.sock.shutdown(socket.SHUT_RDWR)
self.sock.close()