// Close closes all readers
545691
func (c *Client) Close() error {
	if c.fsHandler != nil {
		return c.fsHandler.Close()
	}
	return nil
}
6088
func (c *Closer) Close() error {
	c.Count++
	if cl, ok := c.Reader.(io.Closer); ok {
		return cl.Close()
	}
	return nil
}
1144935
func (i *Iterator) Close() error {
	i.r.SetChunk(nil)
	return i.Error()
}
34848
func (w *Watcher) Close() error {
	if w.isClosed {
		return nil
	}
	w.isClosed = true

	// Remove all watches
	for path := range w.watches {
		w.RemoveWatch(path)
	}

	// Send "quit" message to the reader goroutine
	w.done <- true

	return nil
}
557316
func (br *BlockReader) Close() error {
	br.closed = true
	if br.conn != nil {
		br.conn.Close()
	}

	return nil
}
383741
func (c *Connection) Close() error {
	var err error

	c.mu.Lock()
	defer c.mu.Unlock()

	if !c.isClosed() {
		c.setClosed()
		close(c.stopReadChan)
		err = c.Conn.Close()
	}

	return err
}
150980
func (t *Tar) Close() error {
	var err error
	if t.tr != nil {
		t.tr = nil
	}
	if t.tw != nil {
		tw := t.tw
		t.tw = nil
		err = tw.Close()
	}
	// make sure cleanup of "Reader/Writer wrapper"
	// (say that ten times fast) happens AFTER the
	// underlying stream is closed
	if t.cleanupWrapFn != nil {
		t.cleanupWrapFn()
	}
	return err
}
1275706
func (r *Reader) Close() error {
	if r.input != nil {
		r.input.Close()
	}
	if r.output != nil {
		r.output.Close()
	}
	if r.cmd != nil {
		return r.cmd.Wait()
	}
	return nil
}
172247
func (l *JSONFileLogger) Close() error {
	l.mu.Lock()
	l.closed = true
	err := l.writer.Close()
	for r := range l.readers {
		r.ProducerGone()
		delete(l.readers, r)
	}
	l.mu.Unlock()
	return err
}
88392
func (m *MergeIterator) Close() error {
	var rv error
	for i := range m.itrs {
		// close all iterators, return first error if any
		err := m.itrs[i].Close()
		if rv == nil {
			rv = err
		}
	}
	return rv
}
1191005
func (r *OnEOFReader) Close() error {
	err := r.Rc.Close()
	r.runFunc()
	return err
}
956100
func (f *gzipReader) Close() error {
	var errors []error
	if f.ReadCloser != nil {
		errors = append(errors, f.ReadCloser.Close())
		f.ReadCloser = nil
	}
	if f.file != nil {
		errors = append(errors, f.file.Close())
		f.file = nil
	}
	return trace.NewAggregate(errors...)
}
36231
func (r *translateFileReader) Close() error {
	r.once.Do(func() { close(r.closing) })

	if r.file != nil {
		return r.file.Close()
	}
	return nil
}
773312
func (r *WALSegmentReader) Close() error {
	if r.rc == nil {
		return nil
	}
	err := r.rc.Close()
	r.rc = nil
	return err
}
546770
func Close(c Closer) {
	if err := c.Close(); err != nil {
		log.Warnf("failed to close %v: %v", c, err)
	}
}
977979
func (w *WriteOnCloser) Close() error {
	if !w.hasWritten {
		_, err := w.Write(nil)
		if err != nil {
			return err
		}
	}
	if closer, ok := w.Writer.(io.Closer); ok {
		return closer.Close()
	}
	return nil
}
816769
func (c *CyclePDB) Close() error {
	close(c.readMovements)
	c.wg.Wait()
	return c.blobs.close()
}