Explorar o código

lib/api: Missing return after HTTP error

Jakob Borg hai 1 ano
pai
achega
4dfb9d7c83
Modificáronse 1 ficheiros con 1 adicións e 0 borrados
  1. 1 0
      lib/api/api.go

+ 1 - 0
lib/api/api.go

@@ -977,6 +977,7 @@ func (s *service) getDBFile(w http.ResponseWriter, r *http.Request) {
 	av, err := s.model.Availability(folder, gf, protocol.BlockInfo{})
 	av, err := s.model.Availability(folder, gf, protocol.BlockInfo{})
 	if err != nil {
 	if err != nil {
 		http.Error(w, err.Error(), http.StatusInternalServerError)
 		http.Error(w, err.Error(), http.StatusInternalServerError)
+		return
 	}
 	}
 	mtimeMapping, mtimeErr := s.model.GetMtimeMapping(folder, file)
 	mtimeMapping, mtimeErr := s.model.GetMtimeMapping(folder, file)