Skip to content

Commit

Permalink
Monitor for client closing stream
Browse files Browse the repository at this point in the history
Fixes containers#7946

Signed-off-by: Jhon Honce <[email protected]>
  • Loading branch information
jwhonce authored and mheon committed Oct 14, 2020
1 parent f8aac65 commit 64b215e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pkg/api/handlers/compat/events.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

}
}

0 comments on commit 64b215e

Please sign in to comment.