mirror of https://github.com/docker/docs.git
Fix bug in engine.Sender
Docker-DCO-1.1-Signed-off-by: Solomon Hykes <solomon@docker.com> (github: shykes)
This commit is contained in:
parent
62f4c88443
commit
9236e088eb
|
@ -55,10 +55,10 @@ func (s *Sender) Handle(job *Job) Status {
|
||||||
var status int
|
var status int
|
||||||
r.NewRoute().KeyStartsWith("cmd", "status").Handler(func(p []byte, f *os.File) error {
|
r.NewRoute().KeyStartsWith("cmd", "status").Handler(func(p []byte, f *os.File) error {
|
||||||
cmd := data.Message(p).Get("cmd")
|
cmd := data.Message(p).Get("cmd")
|
||||||
if len(cmd) != 3 {
|
if len(cmd) != 2 {
|
||||||
return fmt.Errorf("usage: %s <0-127>", cmd[0])
|
return fmt.Errorf("usage: %s <0-127>", cmd[0])
|
||||||
}
|
}
|
||||||
s, err := strconv.ParseUint(cmd[2], 10, 8)
|
s, err := strconv.ParseUint(cmd[1], 10, 8)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return fmt.Errorf("usage: %s <0-127>", cmd[0])
|
return fmt.Errorf("usage: %s <0-127>", cmd[0])
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue