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

server: Flush headers when using wait=true and stream=true
This commit is contained in:
Brandon Philips 2014-07-07 17:04:02 -07:00
commit 43791a2f41

View File

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