Skip to content

Commit 2ff5ee8

Browse files
committed
trim
1 parent 52c4951 commit 2ff5ee8

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

internals/wol/wol.go

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,13 @@ func doActivityCheck(threshold int) {
6161
logger.Debug("Stopping Containers with ", query)
6262

6363
for _, id := range ids {
64-
if strings.ToLower(getLabel(id, WOL_AUTOSTOP)) != "false" {
64+
autostop := getLabel(id, WOL_AUTOSTOP)
65+
66+
if strings.TrimSpace(autostop) == "" {
67+
continue
68+
}
69+
70+
if strings.ToLower(autostop) != "false" {
6571
_, err := docker.StopContainer(id, client.ContainerStopOptions{})
6672

6773
if err != nil {

0 commit comments

Comments
 (0)