pandora icon indicating copy to clipboard operation
pandora copied to clipboard

Added timeout option to http client

Open Irisha opened this issue 6 years ago • 4 comments

Optional Timeout for net.Client.

Irisha avatar Jul 30 '18 15:07 Irisha

Coverage Status

Coverage decreased (-0.03%) to 75.008% when pulling cdffbe1514cce6290e7a4a8cbddde011b8cac4a0 on Irisha:patch-1 into f60c51414ffb8672b54ad0232f54c127971112d6 on yandex:develop.

coveralls avatar Jul 30 '18 15:07 coveralls

Is this a finished PR? The Timeout field is not used anywhere, or am I wrong?

direvius avatar Aug 08 '18 14:08 direvius

Yes, the field is not used yet, we have discussed this in messenger.

skipor avatar Sep 02 '18 14:09 skipor

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.

Irisha avatar Oct 16 '18 14:10 Irisha