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

This commit is contained in:
Harshavardhana 2019-05-14 16:10:51 -07:00 committed by kannappanr
parent 9b4a81ee60
commit 0022c9d210

View File

@ -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)