prevent 0-value ticker during ssh keepalive

This commit is contained in:
Matthew Hooker 2018-02-12 10:45:53 -08:00
parent 2747562708
commit a4123eabe3
No known key found for this signature in database
GPG Key ID: 7B5F933D9CE8C6A1
1 changed files with 1 additions and 1 deletions

View File

@ -112,7 +112,7 @@ func (c *comm) Start(cmd *packer.RemoteCmd) (err error) {
} }
go func() { go func() {
if c.config.KeepAliveInterval < 0 { if c.config.KeepAliveInterval <= 0 {
return return
} }
c := time.NewTicker(c.config.KeepAliveInterval) c := time.NewTicker(c.config.KeepAliveInterval)