Skip to content

Commit c796e1b

Browse files
hilariocoelhoalexellis
authored andcommitted
forward original request's context
Signed-off-by: Hilário Coelho <[email protected]>
1 parent dd56bb9 commit c796e1b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

executor/http_runner.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,9 +108,9 @@ func (f *HTTPFunctionRunner) Run(req FunctionRequest, contentLength int64, r *ht
108108
var cancel context.CancelFunc
109109

110110
if f.ExecTimeout.Nanoseconds() > 0 {
111-
reqCtx, cancel = context.WithTimeout(context.Background(), f.ExecTimeout)
111+
reqCtx, cancel = context.WithTimeout(r.Context(), f.ExecTimeout)
112112
} else {
113-
reqCtx = context.Background()
113+
reqCtx = r.Context()
114114
cancel = func() {
115115

116116
}

0 commit comments

Comments
 (0)