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:
parent
afaa9344c7
commit
fad4a6cb8d
1 changed files with 2 additions and 1 deletions
|
@ -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 a new issue