mirror of
https://github.com/status-im/consul.git
synced 2025-01-11 06:16:08 +00:00
Seems like we should actually check the reference count.
This commit is contained in:
parent
3b12ff3377
commit
470d0f1e58
@ -288,7 +288,7 @@ func (p *ConnPool) clearConn(conn *Conn) {
|
|||||||
p.Unlock()
|
p.Unlock()
|
||||||
|
|
||||||
// Close down immediately if idle
|
// Close down immediately if idle
|
||||||
if refCount := atomic.LoadInt32(&conn.shouldClose); refCount == 0 {
|
if refCount := atomic.LoadInt32(&conn.refCount); refCount == 0 {
|
||||||
conn.Close()
|
conn.Close()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user