Skip to content

Commit d66e959

Browse files
committed
code health: remove duplicate box.info check
It's enough to get `box.info` table once in ConnectionPool.getConnectionRole(). Part of #208
1 parent e47a27a commit d66e959

File tree

1 file changed

+0
-11
lines changed

1 file changed

+0
-11
lines changed

connection_pool/connection_pool.go

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -591,17 +591,6 @@ func (connPool *ConnectionPool) getConnectionRole(conn *tarantool.Connection) (R
591591
return unknown, ErrIncorrectStatus
592592
}
593593

594-
resp, err = conn.Call17("box.info", []interface{}{})
595-
if err != nil {
596-
return unknown, err
597-
}
598-
if resp == nil {
599-
return unknown, ErrIncorrectResponse
600-
}
601-
if len(resp.Data) < 1 {
602-
return unknown, ErrIncorrectResponse
603-
}
604-
605594
replicaRole, ok := resp.Data[0].(map[interface{}]interface{})["ro"]
606595
if !ok {
607596
return unknown, ErrIncorrectResponse

0 commit comments

Comments
 (0)