Merge pull request #8877 from erikh/proxy_error_check

proxy: Fix a potential panic handling error states.
Upstream-commit: fa59fe997c83e2a6968f8c03c64352acd71c26da
Component: engine
This commit is contained in:
Tibor Vass
2014-11-04 11:40:02 -05:00

View File

@ -130,7 +130,12 @@ func (p *proxyCommand) Start() error {
r.Read(buf)
if string(buf) != "0\n" {
errStr, _ := ioutil.ReadAll(r)
errStr, err := ioutil.ReadAll(r)
if err != nil {
errchan <- fmt.Errorf("Error reading exit status from userland proxy: %v", err)
return
}
errchan <- fmt.Errorf("Error starting userland proxy: %s", errStr)
return
}