Monitor for client closing stream

Fixes #7946

Signed-off-by: Jhon Honce <jhonce@redhat.com>
This commit is contained in:
Jhon Honce 2020-10-09 15:39:29 -07:00
parent cec240375d
commit 0cdb10448a
1 changed files with 2 additions and 1 deletions

View File

@ -139,7 +139,8 @@ func GetEvents(w http.ResponseWriter, r *http.Request) {
if flusher, ok := w.(http.Flusher); ok {
flusher.Flush()
}
case <-r.Context().Done():
return
}
}
}