mirror of
https://github.com/Luzifer/mondash.git
synced 2024-09-19 17:02:58 +00:00
Close the reader to ensure we don't spam with open FDs
This commit is contained in:
parent
afaa9344c7
commit
fad4a6cb8d
@ -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()
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user