Merge pull request #212 from rbg/master

Seems like we should actually check the reference count.
This commit is contained in:
Armon Dadgar 2014-06-13 09:59:56 -07:00
commit 39f61e462c
1 changed files with 1 additions and 1 deletions

View File

@ -288,7 +288,7 @@ func (p *ConnPool) clearConn(conn *Conn) {
p.Unlock()
// Close down immediately if idle
if refCount := atomic.LoadInt32(&conn.shouldClose); refCount == 0 {
if refCount := atomic.LoadInt32(&conn.refCount); refCount == 0 {
conn.Close()
}
}