def shutdown(self):
        """Close I/O established in "open"."""
        self.file.close()
        try:
            self.sock.shutdown(socket.SHUT_RDWR)
        except socket.error as e:
            # The server might already have closed the connection
            if e.errno != errno.ENOTCONN:
                raise
        finally:
            self.sock.close()
dataset/ETHPy150Open azoft-dev-team/imagrium/env/Lib/imaplib.py/IMAP4.shutdown/original