close stream body after checking that it's reachable
Iris Lightshard nilix@nilfm.cc
PGP Signature
-----BEGIN PGP SIGNATURE----- iHUEABYKAB0WIQT/foVVmI9pK13hPWFohAcXSWbK8wUCZyJuBgAKCRBohAcXSWbK 81t2AQCKh+2BtlcqgQe41bnd6e7jUpNM6WbVFnVRc4wTTM8IhQD/Ztb155VkFsdy lJIHp73BEjNEilTSmKS3V/WVcmaMJQw= =YgZw -----END PGP SIGNATURE-----
1 files changed,
3 insertions(+),
1 deletions(-)
jump to
M
grimoire.go
→
grimoire.go
@@ -21,13 +21,15 @@
return http.HandlerFunc(handlerFunc) } -type Sentry struct {} +type Sentry struct { +} func (self *Sentry) GetStatus(url string) int { resp, err := http.Get(url) if err != nil { return 500 } else { + resp.Body.Close() return resp.StatusCode } }