[volume] requests that were canceled by the client are not an internal server problem(500 => 499) (#5304)

This commit is contained in:
Konstantin Lebedev
2024-02-15 03:18:56 +05:00
committed by GitHub
parent 3d463ef471
commit 8fb978d6f6
3 changed files with 4 additions and 2 deletions

View File

@@ -53,7 +53,7 @@ func (vs *VolumeServer) privateStoreHandler(w http.ResponseWriter, r *http.Reque
select {
case <-r.Context().Done():
glog.V(4).Infof("request cancelled from %s: %v", r.RemoteAddr, r.Context().Err())
w.WriteHeader(http.StatusInternalServerError)
w.WriteHeader(util.HttpStatusCancelled)
vs.inFlightDownloadDataLimitCond.L.Unlock()
return
default: