google-cloud-go icon indicating copy to clipboard operation
google-cloud-go copied to clipboard

metadata: need http timeout

Open therealmitchconnors opened this issue 1 year ago • 0 comments

Client

metadata

Code

https://github.com/googleapis/google-cloud-go/blob/main/compute/metadata/metadata.go#L66

tcp dial timeout is set, but http timeout is not. If http server connects, but is slow to send response, client will hang indefinitely

Expected behavior

http timeout occurs

Actual behavior

client hangs indefinitely

therealmitchconnors avatar Aug 10 '22 17:08 therealmitchconnors