From 76f25b7708c18a3225cff45b9f7f56c089679732 Mon Sep 17 00:00:00 2001 From: nytpu Date: Tue, 23 Mar 2021 08:53:06 -0600 Subject: Fix bug in co refresh where contexts would be immediately cancelled --- fetch/gemini.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'fetch/gemini.go') diff --git a/fetch/gemini.go b/fetch/gemini.go index 5f26b95..0fbb3ec 100644 --- a/fetch/gemini.go +++ b/fetch/gemini.go @@ -28,8 +28,7 @@ import ( // fetchGemini will make a request for a gemini resource func fetchGemini(remote string) (*gemini.Response, error) { - ctx, cancel := context.WithTimeout(context.Background(), time.Duration(core.Timeout)*time.Second) - defer cancel() + ctx, _ := context.WithTimeout(context.Background(), time.Duration(core.Timeout)*time.Second) client := &gemini.Client{} resp, err := client.Get(ctx, remote) if err != nil { -- cgit v1.2.3