aboutsummaryrefslogtreecommitdiff
path: root/timeout.go
diff options
context:
space:
mode:
authorAdnan Maolood <[email protected]>2021-02-20 15:52:54 -0500
committerAdnan Maolood <[email protected]>2021-02-20 15:52:54 -0500
commit99a8f09c22b22cdf80a0d71e951e9885f4d96b75 (patch)
tree2f376662f53b5e841bb1cff963d8625c4e1e886c /timeout.go
parenthandler: Make ServeGemini accept a Context (diff)
downloadgo-gemini-99a8f09c22b22cdf80a0d71e951e9885f4d96b75.tar.xz
go-gemini-99a8f09c22b22cdf80a0d71e951e9885f4d96b75.zip
TimeoutHandler: Use provided context
Diffstat (limited to 'timeout.go')
-rw-r--r--timeout.go2
1 files changed, 1 insertions, 1 deletions
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{})