Skip to content

Commit

Permalink
Fix spelling errors in logs/comments
Browse files Browse the repository at this point in the history
  • Loading branch information
vmorganp committed Sep 1, 2022
1 parent 1256eea commit 2e69b8d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lazytainer.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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")
}
}
}
Expand Down

0 comments on commit 2e69b8d

Please sign in to comment.