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