Skip to content

Commit 41f6b20

Browse files
committed
* Disabled check of node exists with balancers.SingleConn
1 parent 768a3cb commit 41f6b20

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
* Disabled check of node exists with `balancers.SingleConn`
12
* Improved code with `go-critic` linter
23
* Added session info into `database/sql` event `connected`
34

internal/balancer/balancer.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,9 @@ type Balancer struct {
4545
}
4646

4747
func (b *Balancer) HasNode(id uint32) bool {
48+
if b.balancerConfig.SingleConn {
49+
return true
50+
}
4851
b.mu.RLock()
4952
defer b.mu.RUnlock()
5053
if _, has := b.connectionsState.connByNodeID[id]; has {

0 commit comments

Comments
 (0)