flounder

A simple gemini site builder
Log | Files | Refs | README | LICENSE

commit 6eb2c61905096c7f23a55571c4253b62f6214560
parent 268a068078b3b2296fb456fdb4f4699fc332cfb9
Author: alex wennerberg <alex@alexwennerberg.com>
Date:   Sun, 31 Oct 2021 00:38:14 -0700

fix proxy timeout

Diffstat:
Mproxy.go | 8+-------
1 file changed, 1 insertion(+), 7 deletions(-)

diff --git a/proxy.go b/proxy.go @@ -48,15 +48,9 @@ func proxyGemini(w http.ResponseWriter, r *http.Request) { req.Host += ":1965" } - d := time.Now().Add(1 * time.Minute) + d := time.Now().Add(30 * time.Second) ctx, cancel := context.WithDeadline(context.Background(), d) defer cancel() - select { - case <-time.After(1 * time.Minute): - fmt.Println("overslept") - case <-ctx.Done(): - fmt.Println(ctx.Err()) - } resp, err := client.Do(ctx, &req) if err != nil {