Skip to content

Commit 7da21d7

Browse files
committed
change for fluctuating test
1 parent db34939 commit 7da21d7

1 file changed

Lines changed: 4 additions & 6 deletions

File tree

pool/connection_pool.go

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -632,14 +632,12 @@ func (p *ConnectionPool) getConnectionFromPool(name string) (*tarantool.Connecti
632632
}
633633

634634
func (p *ConnectionPool) deleteConnection(name string) {
635-
if conn := p.anyPool.DeleteConnection(name); conn != nil {
636-
if conn := p.rwPool.DeleteConnection(name); conn == nil {
637-
p.roPool.DeleteConnection(name)
638-
}
639-
// The internal connection deinitialization.
635+
conn := p.anyPool.DeleteConnection(name)
636+
p.rwPool.DeleteConnection(name)
637+
p.roPool.DeleteConnection(name)
638+
if conn != nil {
640639
p.watcherContainer.mutex.RLock()
641640
defer p.watcherContainer.mutex.RUnlock()
642-
643641
_ = p.watcherContainer.foreach(func(watcher *poolWatcher) error {
644642
watcher.unwatch(conn)
645643
return nil

0 commit comments

Comments
 (0)