Skip to content

Commit

Permalink
Addressd comment
Browse files Browse the repository at this point in the history
  • Loading branch information
shibd committed Dec 30, 2024
1 parent bb21347 commit 26a6095
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pulsar/internal/connection_pool.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ type ConnectionPool interface {
GetConnections() map[string]Connection

// GenerateRoundRobinIndex generates a round-robin index.
GenerateRoundRobinIndex() uint32
GenerateRoundRobinIndex() int32

// Close all the connections in the pool
Close()
Expand Down Expand Up @@ -147,8 +147,8 @@ func (p *connectionPool) GetConnections() map[string]Connection {
return conns
}

func (p *connectionPool) GenerateRoundRobinIndex() uint32 {
return atomic.AddUint32(&p.roundRobinCnt, 1) % p.maxConnectionsPerHost
func (p *connectionPool) GenerateRoundRobinIndex() int32 {
return int32(atomic.AddUint32(&p.roundRobinCnt, 1) % p.maxConnectionsPerHost)
}

func (p *connectionPool) Close() {
Expand Down

0 comments on commit 26a6095

Please sign in to comment.