all repos — honk @ 8bb977e37632f333840174de9026d42fbde25431

my fork of honk

fix crash in pfp code attempt yksi
Anirudh Oppiliappan x@icyphox.sh
Thu, 22 Jun 2023 12:19:10 +0300
commit

8bb977e37632f333840174de9026d42fbde25431

parent

6a2a30ca702f889a47cc3c44b33b32dd3219af97

1 files changed, 8 insertions(+), 7 deletions(-)

jump to
M web.goweb.go

@@ -2333,15 +2333,16 @@ res, err := http.Get(pfpurl)

if err != nil { dlog.Println("avatating: getting pfp url:", err) a = avatateautogen(r) - } - defer res.Body.Close() + } else { + defer res.Body.Close() - pfpbytes, err := io.ReadAll(res.Body) - if err != nil { - dlog.Println("avatating: bruh shits clapped:", err) - a = avatateautogen(r) + pfpbytes, err := io.ReadAll(res.Body) + if err != nil { + dlog.Println("avatating: bruh shits clapped:", err) + a = avatateautogen(r) + } + a = pfpbytes } - a = pfpbytes } else { a = avatateautogen(r) }