Fix mismatched type error (int and time.Duration)

This commit is contained in:
Lukas Gill 2019-01-14 22:27:38 +01:00
parent 7ac526845d
commit 867e934a1a

View File

@ -91,7 +91,7 @@ func (p Plugin) exec(host string, wg *sync.WaitGroup, errChannel chan error) {
p.log(host, "======END======")
}
stdoutChan, stderrChan, doneChan, errChan, err := ssh.Stream(strings.Join(p.Config.Script, "\n"), p.Config.CommandTimeout)
stdoutChan, stderrChan, doneChan, errChan, err := ssh.Stream(strings.Join(p.Config.Script, "\n"), time.Duration(p.Config.CommandTimeout) * time.Second)
if err != nil {
errChannel <- err
} else {