Skip to content

Commit

Permalink
ensure curl connection timeout of 5 seconds
Browse files Browse the repository at this point in the history
  • Loading branch information
tomtrix committed Nov 20, 2024
1 parent f346372 commit 28d0e25
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion providers/os/id/azcompute/azcompute.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ func (m *commandInstanceMetadata) Identify() (Identity, error) {
var instanceDocument string
switch {
case m.platform.IsFamily(inventory.FAMILY_UNIX):
cmd, err := m.conn.RunCommand("curl --retry 5 --retry-delay 1 --max-time 5 --noproxy '*' -H Metadata:true " + identityUrl)
cmd, err := m.conn.RunCommand("curl --retry 5 --retry-delay 1 --connect-timeout 1 --retry-max-time 5 --max-time 10 --noproxy '*' -H Metadata:true " + identityUrl)
if err != nil {
return Identity{}, err
}
Expand Down

0 comments on commit 28d0e25

Please sign in to comment.