Don't error integration tests on unexpected EOF at Stop()

This commit is contained in:
Jakob Borg 2015-07-22 10:42:06 +02:00
parent 42dc51784e
commit e205f8afbb
1 changed files with 3 additions and 1 deletions

View File

@ -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()