From 987c0789570e7f6447ab8625878949eb97e473f5 Mon Sep 17 00:00:00 2001 From: Robert B Gordon Date: Fri, 13 Jun 2014 11:25:01 -0500 Subject: [PATCH] Seems like we should actually check the reference count. --- consul/pool.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/consul/pool.go b/consul/pool.go index 91f53a677..804a900f5 100644 --- a/consul/pool.go +++ b/consul/pool.go @@ -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() } }