Skip to content

Commit

Permalink
Fix locking when retriving connection from controlConn
Browse files Browse the repository at this point in the history
  • Loading branch information
sylwiaszunejko committed Jul 24, 2024
1 parent 6af144e commit 7a8b873
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions session.go
Original file line number Diff line number Diff line change
Expand Up @@ -233,9 +233,10 @@ func (s *Session) init() error {
if err := s.control.connect(hosts); err != nil {
return err
}
s.control.getConn().conn.mu.Lock()
s.tabletsRoutingV1 = s.control.getConn().conn.isTabletSupported()
s.control.getConn().conn.mu.Unlock()
conn := s.control.getConn().conn
conn.mu.Lock()
s.tabletsRoutingV1 = conn.isTabletSupported()
conn.mu.Unlock()

if !s.cfg.DisableInitialHostLookup {
var partitioner string
Expand Down

0 comments on commit 7a8b873

Please sign in to comment.