Skip to content

Commit ac6fe04

Browse files
authored
Added 2 seconds timeout for EC2 metadata requests (#138)
1 parent 63bb73c commit ac6fe04

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

sdk/src/Core/Plugins/EC2Plugin.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,7 @@ protected virtual async Task<string> DoRequest(string url, HttpMethod method, Di
131131
}
132132
}
133133

134+
_client.Timeout = TimeSpan.FromSeconds(2); // 2 seconds timeout
134135
HttpResponseMessage response = await _client.SendAsync(request);
135136
if (response.IsSuccessStatusCode)
136137
{

0 commit comments

Comments
 (0)