code: def can_ignore_error(self, reqhnd=None):
          
          value = sys.exc_info()[1]
          try:
              if isinstance(value, BrokenPipeError) or \
                      isinstance(value, ConnectionResetError):
                  return True
          except NameError:
              pass
          if not self.done:
              return False
          if not isinstance(value, socket.error):
              return False
          need_close = value.errno == 9
          if need_close and reqhnd is not None:
              reqhnd.close_connection = 1
          return need_close
docs: Tests if the error is worth reporting.