From 3f11e92a4165bd20eeb8be972c5aceeca3abfb26 Mon Sep 17 00:00:00 2001 From: Sam Whited <sam@samwhited.com> Date: Fri, 25 Feb 2022 13:02:26 -0500 Subject: [PATCH] agent: don't wake up main thread every hour This patch removes an unnecessary loop that was waking up the main agent thread every hour (not that waking up the main thread just to put it back to sleep was likely going to be a problem, but we might as well reduce context switching if at all possible). Signed-off-by: Sam Whited <sam@samwhited.com> --- agent/main.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/agent/main.go b/agent/main.go index 9efe154..367d21b 100644 --- a/agent/main.go +++ b/agent/main.go @@ -70,9 +70,7 @@ func main() { agent.Start() defer agent.Stop() - for { - time.Sleep(time.Hour) - } + select {} } func registerBandwidth(agent *lbagent.Agent, config Config) { -- GitLab