mirror of
https://git.sr.ht/~adnano/go-gemini
synced 2024-05-08 02:26:21 +02:00
TimeoutHandler: Use provided context
This commit is contained in:
parent
e9a68917c9
commit
99a8f09c22
|
@ -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{})
|
||||
|
|
Loading…
Reference in New Issue