Fix bug in co refresh where contexts would be immediately cancelled

This commit is contained in:
nytpu
2021-03-23 08:53:06 -06:00
parent 5183306350
commit 76f25b7708
2 changed files with 8 additions and 9 deletions
+1 -2
View File
@@ -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 {