File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -8,9 +8,9 @@ namespace launchdarkly::server_side {
88
99std::string MakeInstanceId () {
1010 // boost::uuids::random_generator emits a version 4 (random) UUID, which is
11- // what the SCMP spec requires. The generator carries state (an internal
12- // RNG), so constructing it on every call is fine for our use case where we
13- // only call MakeInstanceId once per SDK instance .
11+ // what the SCMP spec requires. The generator carries state (an internal RNG
12+ // seeded from system entropy on construction), so we cache it per thread to
13+ // avoid redundant entropy draws on repeated calls .
1414 static thread_local boost::uuids::random_generator generator;
1515 return boost::uuids::to_string (generator ());
1616}
Original file line number Diff line number Diff line change @@ -9,8 +9,6 @@ namespace launchdarkly::server_side {
99 * estimating server-connection-minutes when polling. The value is a v4 UUID
1010 * that is generated once per SDK instance and remains constant for the
1111 * lifetime of the client.
12- *
13- * See: sdk-specs / SCMP-server-connection-minutes-polling.
1412 */
1513inline constexpr char const * kInstanceIdHeader = " X-LaunchDarkly-Instance-Id" ;
1614
You can’t perform that action at this time.
0 commit comments