Add connection close proactively for Walk() http/rpc (#7645)

master
Harshavardhana 6 years ago committed by kannappanr
parent 9b4a81ee60
commit 0022c9d210
  1. 1
      cmd/storage-rest-server.go

@ -415,6 +415,7 @@ func (s *storageRESTServer) WalkHandler(w http.ResponseWriter, r *http.Request)
}
defer w.(http.Flusher).Flush()
w.Header().Set("Connection", "close") // Pro-actively ask client to close this connection.
encoder := gob.NewEncoder(w)
for fi := range fch {
encoder.Encode(&fi)

Loading…
Cancel
Save