Browse Source

agent: Handle cancel for idle wait

pull/312/head
Armon Dadgar 10 years ago
parent
commit
3286074758
  1. 6
      command/agent/remote_exec.go

6
command/agent/remote_exec.go

@ -220,7 +220,11 @@ WAIT:
}
case <-time.After(spec.Wait):
// Acts like a heartbeat, since there is no output
a.remoteExecWriteOutput(&event, num, nil)
if !a.remoteExecWriteOutput(&event, num, nil) {
close(writer.CancelCh)
exitCode = 255
return
}
}
}

Loading…
Cancel
Save