CoolIceV commented on code in PR #1958:
URL: https://github.com/apache/dubbo-go/pull/1958#discussion_r916432282


##########
cluster/loadbalance/p2c/loadbalance.go:
##########
@@ -44,6 +44,7 @@ var (
 )
 
 func init() {
+       rand.Seed(randSeed())

Review Comment:
   Each init() is called only once in golang, and I think it is sufficient to 
ensure that the seed does not change after the program starts running, 
regardless of the number of times the rand.Seed() is called in the program.
   
   In addition, the imported third-party package may call rand.Seed() even if 
we only run it once



-- 
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]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to