We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent db34939 commit 7da21d7Copy full SHA for 7da21d7
1 file changed
pool/connection_pool.go
@@ -632,14 +632,12 @@ func (p *ConnectionPool) getConnectionFromPool(name string) (*tarantool.Connecti
632
}
633
634
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.
+ conn := p.anyPool.DeleteConnection(name)
+ p.rwPool.DeleteConnection(name)
+ p.roPool.DeleteConnection(name)
+ if conn != nil {
640
p.watcherContainer.mutex.RLock()
641
defer p.watcherContainer.mutex.RUnlock()
642
-
643
_ = p.watcherContainer.foreach(func(watcher *poolWatcher) error {
644
watcher.unwatch(conn)
645
return nil
0 commit comments