Add comment about random map iteration

This commit is contained in:
Tyler Treat
2017-06-27 16:09:14 -05:00
parent a0f32a156d
commit 84d00a0395

View File

@@ -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++