From 900a0327bdd16e7966d972e878302e7f475e3181 Mon Sep 17 00:00:00 2001 From: Ian Rose Date: Fri, 24 Nov 2023 23:48:28 -0500 Subject: [PATCH] fix --- cmd/webapp/main.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/cmd/webapp/main.go b/cmd/webapp/main.go index 4b2876a..3b097b8 100644 --- a/cmd/webapp/main.go +++ b/cmd/webapp/main.go @@ -125,7 +125,7 @@ func main() { mux.HandleFunc("/dump/", svr.dumpHandler) stravaDb := strava.NewSqliteDb(db) - http.HandleFunc("/strava/exchange_token/", func(w http.ResponseWriter, r *http.Request) { + mux.HandleFunc("/strava/exchange_token/", func(w http.ResponseWriter, r *http.Request) { log.Printf("token exchange strava request to %v", r.URL) strava.TokenHandler(w, r, stravaDb, stravaAccount) }) @@ -182,7 +182,9 @@ func main() { go func() { if err := httpsSrv.ServeTLS(lis, "", ""); err != nil { - log.Fatalf("failure in https server: %+v", err) + if err != http.ErrServerClosed { + log.Fatalf("failure in https server: %+v", err) + } } }() }