Browse Source

Merge pull request #877 from Rawn/flush-headers-on-wait-stream

server: Flush headers when using wait=true and stream=true
Brandon Philips 11 years ago
parent
commit
43791a2f41
1 changed files with 1 additions and 0 deletions
  1. 1 0
      server/v2/get_handler.go

+ 1 - 0
server/v2/get_handler.go

@@ -68,6 +68,7 @@ func handleWatch(key string, recursive, stream bool, waitIndex string, w http.Re
 	closeChan := cn.CloseNotify()
 
 	writeHeaders(w, s)
+	w.(http.Flusher).Flush()
 
 	if stream {
 		// watcher hub will not help to remove stream watcher