Skip to content

Commit 06f9b96

Browse files
committed
LiveStats, simplify reverse proxy logic
1 parent 9f2196a commit 06f9b96

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

Protest/Tools/LiveStats.cs

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -275,14 +275,11 @@ public static async void DeviceStats(HttpListenerContext ctx) {
275275
}
276276

277277
if (!String.IsNullOrEmpty(_hostname?.value) && !String.IsNullOrEmpty(_ip?.value)) { //check reverse dns mismatch
278-
string hostnameValue = _hostname?.value ?? string.Empty;
279-
string[] hostnames = hostnameValue.Split(';').Select(o => o.Trim()).ToArray();
280-
281-
string ipValue = _ip?.value ?? string.Empty;
282-
string[] ips = ipValue.Split(';').Select(o => o.Trim()).ToArray();
278+
string[] hostnames = _hostname.value.Split(';').Select(o => o.Trim()).ToArray();
279+
string[] ips = _ip.value.Split(';').Select(o => o.Trim()).ToArray();
283280

284281
for (int i = 0; i < hostnames.Length; i++) {
285-
if (String.IsNullOrEmpty(hostnames[i])) { continue; }
282+
if (String.IsNullOrEmpty(hostnames[i])) continue;
286283

287284
try {
288285
IPAddress[] reversed = System.Net.Dns.GetHostAddresses(hostnames[i]);

0 commit comments

Comments
 (0)