mirror of
https://github.com/gogrlx/nats-server.git
synced 2026-04-14 10:10:42 -07:00
Add comment about random map iteration
This commit is contained in:
@@ -296,6 +296,7 @@ func (m *maxConnOption) Apply(server *Server) {
|
||||
clients = make([]*client, len(server.clients))
|
||||
i = 0
|
||||
)
|
||||
// Map iteration is random, which allows us to close random connections.
|
||||
for _, client := range server.clients {
|
||||
clients[i] = client
|
||||
i++
|
||||
|
||||
Reference in New Issue
Block a user