1
0
Fork 0
mirror of https://github.com/Luzifer/mondash.git synced 2024-12-22 20:11:18 +00:00

Close the reader to ensure we don't spam with open FDs

This commit is contained in:
Knut Ahlers 2015-04-22 22:13:00 +02:00
parent afaa9344c7
commit fad4a6cb8d

View file

@ -45,10 +45,11 @@ func runWelcomePage() {
url := fmt.Sprintf("%s/welcome/beer_available", baseURL)
req, _ := http.NewRequest("PUT", url, bytes.NewBuffer(body))
req.Header.Add("Authorization", welcomeAPIToken)
_, err = http.DefaultClient.Do(req)
resp, err := http.DefaultClient.Do(req)
if err != nil {
log.Printf("[WelcomeRunner] %s", err)
}
resp.Body.Close()
}
}