// Close shutdowns the data(base) connection.
349081
func (d *DB) Close() {
	if err := d.db.Close(); err != nil {
		Panic(err)
	}
}
1268285
func (c *Conn) Close() error {
	return c.opError(opClose, c.fd.Close())
}
1169325
func (db *BytesConnectionRedis) Close() error {
	if db.closed {
		db.Debug("Close() called on a closed connection")
		return nil
	}
	db.Debug("Close()")
	db.closed = true
	safeclose.Close(db.closeCh)
	if db.client != nil {
		err := safeclose.Close(db.client)
		if err != nil {
			return fmt.Errorf("Close() encountered error: %s", err)
		}
	}
	return nil
}
47386
func (r *Response) Close() error {
	if r.closed {
		return nil
	}
	err := r.conn.Close()
	_, _, err2 := r.c.conn.ReadResponse(StatusClosingDataConnection)
	if err2 != nil {
		err = err2
	}
	r.closed = true
	return err
}
144920
func (bt *Translator) Close() error {
	err := bt.Db.Sync()
	if err != nil {
		return errors.Wrap(err, "syncing db")
	}
	return bt.Db.Close()
}
153059
func (m *PoolMetadata) Close() error {
	if err := m.db.Close(); err != nil && err != bolt.ErrDatabaseNotOpen {
		return err
	}

	return nil
}
211300
func (s *Storage) Close() {
	s.run(func() error {
		s.closed = true
		return nil
	})
}
1238985
func (m *Source) Close() error {
	if m.db != nil {
		err := m.db.Close()
		if err != nil {
			return err
		}
		m.db = nil
	}
	return nil
}
1330102
func (c *Client) Close() error {
	c.once.Do(c.startLoop)
	c.quit <- struct{}{}
	close(c.msgs)
	<-c.shutdown
	return nil
}
484951
func (r *Rabbus) Close() error {
	err := r.Amqp.Close()
	close(r.emit)
	close(r.emitOk)
	close(r.emitErr)
	close(r.reconn)
	return err
}
359873
func (s *session) close() error {
	s.closeOnce.Do(func() {
		s.cancel()
		if s.conn != nil {
			s.conn.Close(false)
		}
		close(s.closed)
	})

	return nil
}
409576
func (db *Database) Close() error {
	db.mux.Lock()
	defer db.mux.Unlock()
	return db.pool.close()
}
862983
func (c *Connection) Close() {
	c.Lock()
	defer c.Unlock()
	if c.conn != nil {
		c.conn.Close()
		c.conn = nil
		if c.onClose != nil {
			c.onClose(c.id)
			c.onClose = nil
		}
	}
}
1240535
func (c *NamenodeConnection) Close() error {
	if c.conn != nil {
		return c.conn.Close()
	}
	return nil
}
546770
func Close(c Closer) {
	if err := c.Close(); err != nil {
		log.Warnf("failed to close %v: %v", c, err)
	}
}
38769
func (c *Client) Close() error {
	close(c.quit)
	c.wg.Wait()
	return c.db.Close()
}
175162
func (p *conn) Close() error {
	p.Lock()
	defer p.Unlock()
	if p.IsOpen() {
		p.open = false
		return p.c.Close()
	}
	return nil
}