If a default http client is used in place of a provided one, you might want to ensure that it has a timeout. http.DefaultClient has no timeout, and under certain events could possibly deadlock. There are one or two other things that should probably be touched up, but this one sticks out to me the most.
While I put in 5 minutes, feel free to change it to however long you think is appropriate for a default.
If a default http client is used in place of a provided one, you might want to ensure that it has a timeout.
http.DefaultClient
has no timeout, and under certain events could possibly deadlock. There are one or two other things that should probably be touched up, but this one sticks out to me the most.While I put in 5 minutes, feel free to change it to however long you think is appropriate for a default.