Skip to content

Commit 35e40cf

Browse files
author
Paul Marvin
committed
SF-6204: Limit the conditions where calls are made to a non-existent local EC2 endpoint
* Restoring default behavior with the inclusion of null IsEc2
1 parent 88d97c1 commit 35e40cf

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Src/StackifyLib/Models/EnvironmentDetail.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ public static string GetDeviceName()
116116
var deviceName = Environment.MachineName;
117117
var isDefaultDeviceNameEc2 = IsEc2MachineName(deviceName);
118118

119-
if (Config.IsEc2 == true || isDefaultDeviceNameEc2)
119+
if (Config.IsEc2 == null || Config.IsEc2 == true || isDefaultDeviceNameEc2)
120120
{
121121
var ec2InstanceId = GetEC2InstanceId();
122122
if (string.IsNullOrWhiteSpace(ec2InstanceId) == false)
@@ -193,7 +193,7 @@ public static string GetDeviceName()
193193
var deviceName = Process.GetCurrentProcess().MachineName;
194194
var isDefaultDeviceNameEc2 = IsEc2MachineName(deviceName);
195195

196-
if (Config.IsEc2 == true || isDefaultDeviceNameEc2)
196+
if (Config.IsEc2 == null || Config.IsEc2 == true || isDefaultDeviceNameEc2)
197197
{
198198
var instanceID_task = GetEC2InstanceId();
199199
instanceID_task.Wait();

0 commit comments

Comments
 (0)