-
Notifications
You must be signed in to change notification settings - Fork 23
Open
Description
Currently, the Do function of httpclient.clientImpl uses rand.Intn(len(uris)) to determine the offset that should be used for the URI.
This code uses the global source for randomness, so unless the client application explicitly seeds the global random source, the sequence of offsets that this code chooses will always be the same.
This is not necessarily an issue in and of itself, but does seem somewhat counter-intuitive. Possible approaches:
- Document that sequence of offsets chosen will be deterministic unless global source of randomness is seeded
- Store
*rand.Randas part of the client and seed it on construction (and optionally expose a way to disable seeding it/specifying a seed manually if there is a desire to control the sequence)
Metadata
Metadata
Assignees
Labels
No labels