Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 553982b

Browse files
committed
Actually check for the error. Not sure how I missed the logs, oops
1 parent 5708038 commit 553982b

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

connectable.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -178,8 +178,10 @@ func setupContainer(id string) error {
178178
log.Printf("setting iptables on %s \n", container.ID[:12])
179179
shellCmd := strings.Join(cmds, " && ")
180180
err := runNetCmd(container.ID, self.Image, shellCmd)
181-
log.Printf("error setting iptables on %s: %s \n", container.ID[:12], err)
182-
return err
181+
if err != nil {
182+
log.Printf("error setting iptables on %s: %s \n", container.ID[:12], err)
183+
return err
184+
}
183185
}
184186
}
185187
return nil

0 commit comments

Comments
 (0)