Skip to content

Commit

Permalink
Merge pull request #3 from MiSArch/bugfix/wrong_number_parsing
Browse files Browse the repository at this point in the history
fix how numbers are parsed
  • Loading branch information
nk-coding authored May 17, 2024
2 parents 801e6c3 + 46f07e3 commit de7ed2d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ExperimentConfigSidecar/Services/ConfigService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ private void UpdateArtificialMemoryUsage(Dictionary<string, JsonElement> config)
{
if (config.TryGetValue(ConfigPropertyDefinitions.MemoryUsageKey, out JsonElement value))
{
artificialMemoryUsage = value.TryGetInt64(out var leak) ? leak : 0;
artificialMemoryUsage = (value.ValueKind == JsonValueKind.Number && value.TryGetInt64(out var leak)) ? leak : 0;
}
memoryUsageService.UpdateMemoryUsage(artificialMemoryUsage);
}
Expand Down

0 comments on commit de7ed2d

Please sign in to comment.