diff --git a/client/client.go b/client/client.go index db3c02c..e70efa0 100644 --- a/client/client.go +++ b/client/client.go @@ -202,13 +202,16 @@ func NewClient(grpcAddr string, httpAddr string) (HoustonClient, error) { return case exited := <-exitChan: + var newprocs []*procmeta for _, proc := range hc.childProcs { if proc.cmd == exited && proc.state != protos.ProcessState_Stopped { proc.state = protos.ProcessState_Stopped - op.Refresh(ctx, hc.makeOperationQueryRequest()) - break + } else { + newprocs = append(newprocs, proc) } } + hc.childProcs = newprocs + op.Refresh(ctx, hc.makeOperationQueryRequest()) case resp := <-operationChan: switch shared.Operation(resp.Operation) {