pandora
pandora copied to clipboard
Added timeout option to http client
Optional Timeout for net.Client.
Coverage decreased (-0.03%) to 75.008% when pulling cdffbe1514cce6290e7a4a8cbddde011b8cac4a0 on Irisha:patch-1 into f60c51414ffb8672b54ad0232f54c127971112d6 on yandex:develop.
Is this a finished PR? The Timeout field is not used anywhere, or am I wrong?
Yes, the field is not used yet, we have discussed this in messenger.
Go’s http package doesn’t specify request timeouts by default, allowing services to hijack your goroutines. Always specify a custom http.Client when connecting to outside services. https://medium.com/@nate510/don-t-use-go-s-default-http-client-4804cb19f779
I have problem with absence timeout when I fire with keep-alive.