Skip to content

Commit

Permalink
Merge pull request #1798 from tgstation/BadWarning
Browse files Browse the repository at this point in the history
Fix a bad warning
  • Loading branch information
Cyberboss authored Mar 4, 2024
2 parents 0152f06 + 4a5610c commit 8332ae8
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/Tgstation.Server.Host/System/PosixProcessFeatures.cs
Original file line number Diff line number Diff line change
Expand Up @@ -172,10 +172,11 @@ public async Task StartAsync(CancellationToken cancellationToken)
var originalOomAdjust = Int16.Parse(trimmedString, CultureInfo.InvariantCulture);
baselineOomAdjust = Math.Clamp(originalOomAdjust, (short)-1000, (short)1000);

if (originalOomAdjust != baselineOomAdjust)
logger.LogWarning("oom_score_adj is at it's limit of 1000 (Clamped from {original}). TGS cannot guarantee the kill order of its parent/child processes!", originalOomAdjust);
else
logger.LogWarning("oom_score_adj is at it's limit of 1000. TGS cannot guarantee the kill order of its parent/child processes!");
if (baselineOomAdjust == 1000)
if (originalOomAdjust != baselineOomAdjust)
logger.LogWarning("oom_score_adj is at it's limit of 1000 (Clamped from {original}). TGS cannot guarantee the kill order of its parent/child processes!", originalOomAdjust);
else
logger.LogWarning("oom_score_adj is at it's limit of 1000. TGS cannot guarantee the kill order of its parent/child processes!");

try
{
Expand Down

0 comments on commit 8332ae8

Please sign in to comment.