def _shutdown_read(self): """Shutdown reading.""" with self._lock: if self.socket: try: self.socket.shutdown(socket.SHUT_RD) except: pass