diff --git a/go/vt/tabletserver/cache_pool.go b/go/vt/tabletserver/cache_pool.go index 3ab6f48ab5..3507fd5b2e 100644 --- a/go/vt/tabletserver/cache_pool.go +++ b/go/vt/tabletserver/cache_pool.go @@ -176,42 +176,42 @@ func (cp *CachePool) StatsJSON() string { } func (cp *CachePool) Capacity() int64 { - if cp == nil { + if cp.pool == nil { return 0 } return cp.pool.Capacity() } func (cp *CachePool) Available() int64 { - if cp == nil { + if cp.pool == nil { return 0 } return cp.pool.Available() } func (cp *CachePool) MaxCap() int64 { - if cp == nil { + if cp.pool == nil { return 0 } return cp.pool.MaxCap() } func (cp *CachePool) WaitCount() int64 { - if cp == nil { + if cp.pool == nil { return 0 } return cp.pool.WaitCount() } func (cp *CachePool) WaitTime() time.Duration { - if cp == nil { + if cp.pool == nil { return 0 } return cp.pool.WaitTime() } func (cp *CachePool) IdleTimeout() time.Duration { - if cp == nil { + if cp.pool == nil { return 0 } return cp.pool.IdleTimeout() diff --git a/go/vt/tabletserver/conn_pool.go b/go/vt/tabletserver/conn_pool.go index dbb0f54921..a3676bd772 100644 --- a/go/vt/tabletserver/conn_pool.go +++ b/go/vt/tabletserver/conn_pool.go @@ -110,42 +110,42 @@ func (cp *ConnectionPool) StatsJSON() string { } func (cp *ConnectionPool) Capacity() int64 { - if cp == nil { + if cp.pool == nil { return 0 } return cp.pool.Capacity() } func (cp *ConnectionPool) Available() int64 { - if cp == nil { + if cp.pool == nil { return 0 } return cp.pool.Available() } func (cp *ConnectionPool) MaxCap() int64 { - if cp == nil { + if cp.pool == nil { return 0 } return cp.pool.MaxCap() } func (cp *ConnectionPool) WaitCount() int64 { - if cp == nil { + if cp.pool == nil { return 0 } return cp.pool.WaitCount() } func (cp *ConnectionPool) WaitTime() time.Duration { - if cp == nil { + if cp.pool == nil { return 0 } return cp.pool.WaitTime() } func (cp *ConnectionPool) IdleTimeout() time.Duration { - if cp == nil { + if cp.pool == nil { return 0 } return cp.pool.IdleTimeout()