Avoid fd limits by closing body immediately
authorJacob Casper <dev@jacobcasper.com>
Fri, 17 Apr 2020 16:00:12 +0000 (11:00 -0500)
committerJacob Casper <dev@jacobcasper.com>
Fri, 17 Apr 2020 16:00:12 +0000 (11:00 -0500)
backend/scrape/graph/graph.go

index cc1dc1e..d043209 100644 (file)
@@ -62,6 +62,7 @@ SELECT EXISTS (
                                }
 
                                resp, err := http.PostForm("http://localhost:8080/artist/add", url.Values{"id": {string(artist.ID)}})
+                               resp.Body.Close()
                                if err != nil {
                                        log.Print(err)
                                        success = false