BewareMyPower commented on code in PR #336:
URL: https://github.com/apache/pulsar-client-cpp/pull/336#discussion_r1376963053


##########
lib/ConnectionPool.cc:
##########
@@ -34,13 +34,13 @@ DECLARE_LOG_OBJECT()
 namespace pulsar {
 
 ConnectionPool::ConnectionPool(const ClientConfiguration& conf, 
ExecutorServiceProviderPtr executorProvider,
-                               const AuthenticationPtr& authentication, bool 
poolConnections,
-                               const std::string& clientVersion)
+                               const AuthenticationPtr& authentication, const 
std::string& clientVersion)
     : clientConfiguration_(conf),
       executorProvider_(executorProvider),
       authentication_(authentication),
-      poolConnections_(poolConnections),
-      clientVersion_(clientVersion) {}
+      clientVersion_(clientVersion),
+      randomDistribution_(0, conf.getConnectionsPerBroker()),

Review Comment:
   ```suggestion
         randomDistribution_(0, conf.getConnectionsPerBroker() + 1),
   ```
   
   The `uniform_int_distribution` range is left-closed and right-open



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to