From 99a8f09c22b22cdf80a0d71e951e9885f4d96b75 Mon Sep 17 00:00:00 2001 From: Adnan Maolood Date: Sat, 20 Feb 2021 15:52:54 -0500 Subject: [PATCH] TimeoutHandler: Use provided context --- timeout.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/timeout.go b/timeout.go index 0a48d70..9d3dab6 100644 --- a/timeout.go +++ b/timeout.go @@ -28,7 +28,7 @@ type timeoutHandler struct { } func (t *timeoutHandler) ServeGemini(ctx context.Context, w ResponseWriter, r *Request) { - ctx, cancel := context.WithTimeout(context.TODO(), t.dt) + ctx, cancel := context.WithTimeout(ctx, t.dt) defer cancel() done := make(chan struct{})