From 2e69b8d6d1749bf386260ccca91676c043fbe216 Mon Sep 17 00:00:00 2001 From: vmorganp <31448722+vmorganp@users.noreply.github.com> Date: Thu, 1 Sep 2022 08:18:58 -0700 Subject: [PATCH] Fix spelling errors in logs/comments --- lazytainer.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lazytainer.go b/lazytainer.go index 1682c58..83d6fae 100644 --- a/lazytainer.go +++ b/lazytainer.go @@ -38,9 +38,9 @@ func main() { // if the container is running, see if it needs to be stopped if isContainerOn() { if verbose { - fmt.Println(rxHistory[len(rxHistory)-1]-rxHistory[0], "packets recieved in the last", inactiveTimeout, "seconds") + fmt.Println(rxHistory[len(rxHistory)-1]-rxHistory[0], "packets received in the last", inactiveTimeout, "seconds") } - // if no clients are active on ports and threshhold packets haven't been recieved in TIMEOUT secs + // if no clients are active on ports and threshold packets haven't been received in TIMEOUT secs if getActiveClients() == 0 && rxHistory[0]+minPacketThreshold > rxHistory[len(rxHistory)-1] { // count up if no active clients inactiveSeconds = inactiveSeconds + pollRate @@ -52,13 +52,13 @@ func main() { inactiveSeconds = 0 } } else { - // if more than THRESHHOLD rx in last RXHISTSECONDS seconds, start the container + // if more than THRESHOLD rx in last RXHISTSECONDS seconds, start the container if rxHistory[0]+minPacketThreshold < rxHistory[len(rxHistory)-1] { inactiveSeconds = 0 startContainers() } else { if verbose { - fmt.Println(rxHistory[len(rxHistory)-1], "recieved out of", rxHistory[0]+minPacketThreshold, "packets needed to restart container") + fmt.Println(rxHistory[len(rxHistory)-1], "received out of", rxHistory[0]+minPacketThreshold, "packets needed to restart container") } } }