diff options
| author | Adnan Maolood <[email protected]> | 2021-02-20 15:52:54 -0500 |
|---|---|---|
| committer | Adnan Maolood <[email protected]> | 2021-02-20 15:52:54 -0500 |
| commit | 99a8f09c22b22cdf80a0d71e951e9885f4d96b75 (patch) | |
| tree | 2f376662f53b5e841bb1cff963d8625c4e1e886c /timeout.go | |
| parent | handler: Make ServeGemini accept a Context (diff) | |
| download | go-gemini-99a8f09c22b22cdf80a0d71e951e9885f4d96b75.tar.xz go-gemini-99a8f09c22b22cdf80a0d71e951e9885f4d96b75.zip | |
TimeoutHandler: Use provided context
Diffstat (limited to 'timeout.go')
| -rw-r--r-- | timeout.go | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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{}) |