Skip to content

Conversation

@xrmx
Copy link
Contributor

@xrmx xrmx commented Dec 6, 2024

Use a shorter timeout of 2 seconds for the connection before the 5 seconds read one to avoid blocking too much if the metadata server is not available.

This makes the code behave more similar to the go one: https://github.com/googleapis/google-cloud-go/blob/main/compute/metadata/metadata.go#L65

Use a shorter timeout of 2 seconds instead of the read of 5 seconds to
avoid blocking too much if the metadata server is not available.

This makes the code behave more similar to the go one:
https://github.com/googleapis/google-cloud-go/blob/main/compute/metadata/metadata.go#L65
@xrmx xrmx requested a review from a team as a code owner December 6, 2024 14:34
@aabmass
Copy link
Collaborator

aabmass commented Dec 6, 2024

/gcbrun

@xrmx xrmx changed the title Use a shorter read timeout for the metadata endpoint Use a shorter timeout for the metadata endpoint Dec 6, 2024
@aabmass
Copy link
Collaborator

aabmass commented Dec 9, 2024

/gcbrun

@aabmass aabmass enabled auto-merge (squash) December 9, 2024 17:23
@aabmass aabmass merged commit 5985b57 into GoogleCloudPlatform:main Dec 9, 2024
21 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants