// Close closes the underlying notifier and waits for asynchronous reports to finish.
762523
func (h *Handler) Close() error {
	h.client.Close()
	h.client.Wait()

	return nil
}
675477
func (w *tWriter) close() {
	if w.w != nil {
		w.w.Close()
		w.w = nil
	}
}
334695
func (r *Receiver) Close() error {
	r.cl.Lock()
	defer r.cl.Unlock()
	if r.cl.client == nil {
		return ErrNotConnected
	}
	close(r.chanClose)
	return r.cl.Close()
}
1235756
func (s *Server) Close() error {
	s.locker.Lock()
	defer s.locker.Unlock()

	for l := range s.listeners {
		l.Close()
	}

	for conn := range s.conns {
		conn.Close()
	}

	return nil
}
251833
func (c *Client) Close() error {
	defer close(c.notify)

	_, err := c.Exec("quit")
	err2 := c.conn.Close()

	if err != nil {
		return err
	}

	return err2
}
586699
func (w *worker) Close() {
	w.mu.Lock()
	w.closed = true
	w.mu.Unlock()

	w.taskevents.Close()
}
1328257
func (p *ProgressWriter) Close() (err error) {
	err = p.w.Close()
	p.stopProgress()
	return
}
1220448
func (es *EventSource) Close() {
	if es.r != nil {
		es.r.Close()
	}
	es.err = ErrClosed
}
274844
func (h *Handler) Close() {
	h.once.Do(func() {
		for _, fn := range h.notify {
			fn()
		}
	})
}
37821
func (w *Writer) Close() error {
	w.Flush()
	ret := w.err
	if w.err == nil {
		w.err = errClosed
	}
	return ret
}
552541
func (c *Client) Close() error {
	c.once.Do(func() { close(c.done) })
	c.Flush()
	return nil
}
885484
func (ll *LoopbackListener) Close() (err error) {
	ll.mutex.Lock()
	defer ll.mutex.Unlock()
	if ll.isClosed {
		return syscall.EINVAL
	}
	ll.isClosed = true
	close(ll.ch)
	return
}
1261839
func (w *trezorDriver) Close() error {
	w.version, w.label, w.pinwait = [3]uint32{}, "", false
	return nil
}
1213959
func (l *Listener) Close() error {
	if !l.ok() {
		return syscall.EINVAL
	}
	if !l.close() {
		return &net.OpError{
			Op:   "close",
			Net:  l.conn.LocalAddr().Network(),
			Addr: l.conn.LocalAddr(),
			Err:  errClosing,
		}
	}
	return nil
}
1180022
func (c *confirms) Close() error {
	c.m.Lock()
	defer c.m.Unlock()

	for _, l := range c.listeners {
		close(l)
	}
	c.listeners = nil
	return nil
}
901468
func (l *Listener) Close() error {
	return l.opError(opClose, l.l.Close())
}
502737
func (rw rwCloser) Close() error {
	err := rw.ReadCloser.Close()
	if err := rw.WriteCloser.Close(); err != nil {
		return err
	}
	return err
}