From 6b7201856cb0c180923c545255022ff7b79c816c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan-Otto=20Kr=C3=B6pke?= Date: Thu, 23 Jan 2025 14:56:49 +0100 Subject: [PATCH] fix: process priority setting (#1852) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Jan-Otto Kröpke --- cmd/windows_exporter/main.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/windows_exporter/main.go b/cmd/windows_exporter/main.go index f4e8ea1d1..13f5721c3 100644 --- a/cmd/windows_exporter/main.go +++ b/cmd/windows_exporter/main.go @@ -325,7 +325,7 @@ func setPriorityWindows(logger *slog.Logger, pid int, priority string) error { winPriority, ok := priorityStringToInt[priority] // Only set process priority if a non-default and valid value has been set - if !ok || winPriority != windows.NORMAL_PRIORITY_CLASS { + if !ok || winPriority == windows.NORMAL_PRIORITY_CLASS { return nil }