diff --git a/internal/server/articles.go b/internal/server/articles.go index c28f897..6430651 100644 --- a/internal/server/articles.go +++ b/internal/server/articles.go @@ -14,6 +14,7 @@ func rootHandler(wr http.ResponseWriter, req *http.Request) { if err != nil { http.Error(wr, err.Error(), http.StatusInternalServerError) } + defer store.Close() articles, err := database.ArticlesForDay(store, time.Now()) if err != nil { @@ -37,6 +38,7 @@ func articleHandler(wr http.ResponseWriter, req *http.Request) { if err != nil { http.Error(wr, err.Error(), http.StatusInternalServerError) } + defer store.Close() vars := mux.Vars(req) articleID, err := strconv.Atoi(vars["id"]) diff --git a/server b/server index ecec9fd..503f5d1 100755 Binary files a/server and b/server differ