From e205f8afbbe716533dbdd1a462b512183ffea67c Mon Sep 17 00:00:00 2001 From: Jakob Borg Date: Wed, 22 Jul 2015 10:42:06 +0200 Subject: [PATCH] Don't error integration tests on unexpected EOF at Stop() --- internal/rc/rc.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/internal/rc/rc.go b/internal/rc/rc.go index 74c1a1886..634f96de0 100644 --- a/internal/rc/rc.go +++ b/internal/rc/rc.go @@ -129,7 +129,9 @@ func (p *Process) Stop() (*os.ProcessState, error) { p.stop = true p.eventMut.Unlock() - if _, err := p.Post("/rest/system/shutdown", nil); err != nil { + if _, err := p.Post("/rest/system/shutdown", nil); err != nil && err != io.ErrUnexpectedEOF { + // Unexpected EOF is somewhat expected here, as we may exit before + // returning something sensible. return nil, err } p.cmd.Wait()