serve dlna: fix potential data race #6962

This fixes a data race that was found by static analysis.
This commit is contained in:
Nick Craig-Wood 2023-04-20 17:29:07 +01:00
parent 6092fa57c3
commit 72e624c5e4

View File

@ -303,7 +303,7 @@ func (s *server) Serve() (err error) {
go func() {
fs.Logf(s.f, "Serving HTTP on %s", s.HTTPConn.Addr().String())
err = s.serveHTTP()
err := s.serveHTTP()
if err != nil {
fs.Logf(s.f, "Error on serving HTTP server: %v", err)
}