fix a warning

This commit is contained in:
guochao 2024-12-25 11:03:18 +08:00
parent 018c07d944
commit 593cb02d3f

View File

@ -301,8 +301,9 @@ func (server *Server) streamOnline(w http.ResponseWriter, r *http.Request, mtime
if !exists { if !exists {
server.lu.Lock() server.lu.Lock()
locked = true locked = true
memoryObject, exists = server.o[r.URL.Path]
} }
memoryObject, exists = server.o[r.URL.Path]
if exists { if exists {
if locked { if locked {
server.lu.Unlock() server.lu.Unlock()