1
0
Fork 0
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:
Adnan Maolood 2021-02-20 15:52:54 -05:00
parent e9a68917c9
commit 99a8f09c22

View File

@ -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{})