File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed
Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -129,7 +129,7 @@ public static string GetDeviceName()
129129 }
130130 }
131131
132- return deviceName ;
132+ return deviceName . Substring ( 0 , deviceName . Length > 60 ? 60 : deviceName . Length ) ;
133133 }
134134
135135 public static string GetEC2InstanceId ( )
@@ -215,7 +215,7 @@ public static string GetDeviceName()
215215 }
216216 }
217217
218- return deviceName ;
218+ return deviceName . Substring ( 0 , deviceName . Length > 60 ? 60 : deviceName . Length ) ;
219219 }
220220
221221 public static async Task < string > GetEC2InstanceId ( )
@@ -233,6 +233,11 @@ public static async Task<string> GetEC2InstanceId()
233233 {
234234 string id = await content . Content . ReadAsStringAsync ( ) ;
235235 r = string . IsNullOrWhiteSpace ( id ) ? null : id ;
236+
237+ if ( r . Contains ( "html" ) )
238+ {
239+ r = Environment . MachineName ;
240+ }
236241 }
237242
238243 }
You can’t perform that action at this time.
0 commit comments