From 0022c9d210971c5661849c4b886cba8305b2b4f2 Mon Sep 17 00:00:00 2001 From: Harshavardhana Date: Tue, 14 May 2019 16:10:51 -0700 Subject: [PATCH] Add connection close proactively for Walk() http/rpc (#7645) --- cmd/storage-rest-server.go | 1 + 1 file changed, 1 insertion(+) diff --git a/cmd/storage-rest-server.go b/cmd/storage-rest-server.go index 797c34875..349d5a74a 100644 --- a/cmd/storage-rest-server.go +++ b/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)