Skip to content
Browse files

Use request context for reqctx

This will fix a bug where the watchcloser doesn't realize the context terminates,
and makes sure other parts using the context know to close off after request.

Signed-off-by: Patrick Uiterwijk <>
  • Loading branch information...
puiterwijk authored and mergify committed Aug 10, 2019
1 parent 339f556 commit c6a026e428baaa9b34c8fd54a6f1c0a6f2ae062e
Showing with 1 addition and 1 deletion.
  1. +1 −1 server/service/httpcontext.go
@@ -66,7 +66,7 @@ func addHTTPHeaderInfo(reqlogger *logrus.Entry, r *http.Request) *logrus.Entry {

func (cfg *Service) ctxFromReq(w http.ResponseWriter, r *http.Request, server string) context.Context {
ctx := context.Background()
ctx := r.Context()

ctx = watchCloser(ctx, w)

0 comments on commit c6a026e

Please sign in to comment.
You can’t perform that action at this time.