def close(self):
log.debug("<STR_LIT>" % (self.host, self.port))<EOL>if self._sock:<EOL><INDENT>try:<EOL><INDENT>self._sock.shutdown(socket.SHUT_RDWR)<EOL><DEDENT>except socket.error:<EOL><INDENT>pass<EOL><DEDENT>self._sock.close()<EOL>self._sock = None<EOL><DEDENT>else:<EOL><INDENT>log.debug("<STR_LIT>")<EOL><DEDENT>
Shutdown and close the connection socket