1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00

proxy: Fix a potential panic handling error states.

Docker-DCO-1.1-Signed-off-by: Erik Hollensbe <github@hollensbe.org> (github: erikh)
This commit is contained in:
Erik Hollensbe 2014-10-31 04:20:26 +00:00
parent 107898a773
commit ad5b307d0f

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
}