server: close server automatically with StartAndWait() (#734)

This commit is contained in:
Alessandro Ros
2025-03-23 19:02:02 +01:00
committed by GitHub
parent e46ae59920
commit f290b464b8

View File

@@ -474,6 +474,7 @@ func (s *Server) StartAndWait() error {
if err != nil { if err != nil {
return err return err
} }
defer s.Close()
return s.Wait() return s.Wait()
} }