func (p *pool) put(c *connection) error {
	if p.monitor != nil {
		var cid uint64
		var addr string
		if c != nil {
			cid = c.poolID
			addr = c.addr.String()
		}
		p.monitor.Event(&event.PoolEvent{
			Type:         event.ConnectionReturned,
			ConnectionID: cid,
			Address:      addr,
		})
	}

	if c == nil {
		return nil
	}

	if c.pool != p {
		return ErrWrongPool
	}

	_ = p.conns.Put(c)

	return nil
}
// put returns a connection to this pool. If the pool is connected, the connection is not
// stale, and there is space in the cache, the connection is returned to the cache.
put returns a connection to this pool. If the pool is connected, the connection is not
stale, and there is space in the cache, the connection is returned to the cache.
// put returns a connection to this pool . If the pool is connected the connection is not // stale and there is space in the cache the connection is returned to the cache .
func (p *pool) put(c *connection) error {
	if p.monitor != nil {
		var cid uint64
		var addr string
		if c != nil {
			cid = c.poolID
			addr = c.addr.String()
		}
		p.monitor.Event(&event.PoolEvent{
			Type:         event.ConnectionReturned,
			ConnectionID: cid,
			Address:      addr,
		})
	}
	if c == nil {
		return nil
	}
	if c.pool != p {
		return ErrWrongPool
	}
	_ = p.conns.Put(c)
	return nil
}
func ( p * pool ) put ( c * connection ) error { if p . monitor != nil { var cid uint64 var addr string if c != nil { cid = c . poolID addr = c . addr . String ( ) } p . monitor . Event ( & event . PoolEvent { Type : event . ConnectionReturned , ConnectionID : cid , Address : addr , } ) } if c == nil { return nil } if c . pool != p { return ErrWrongPool } _ = p . conns . Put ( c ) return nil }
put returns a connection to this pool.
put returns a connection to this pool .