Closed syscrusher closed 10 years ago
Thanks mucho for pointing that out...excellent catch!
Also, thanks for the kind words...i'm glad you find it useful. =)
Sorry, I misled you slightly. We still have to call Close within the if that checks whether res is not nil. Otherwise we might try to close something that's not even open.
There's a memory leak the sample app in the README. In the pinger func, defer res.Body.Close() doesn't execute because the function doesn't return because of the loop. I would just close it before sleeping. Not pretty, but just a sample app.
Thanks for the package. Simple API, stable, and extremely useful.