Skip to content

Commit 676bdb7

Browse files
committed
Bugfix
1 parent fdccb7b commit 676bdb7

File tree

1 file changed

+17
-19
lines changed

1 file changed

+17
-19
lines changed

Program.cs

Lines changed: 17 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -164,31 +164,29 @@ static void AddressChangedCallback(object sender, EventArgs e)
164164

165165
if(adapters == null) // No networkadapters found
166166
{
167-
return;
168-
}
169-
170-
var networkChangeAdapterList = settings.NetworkChangeAdapters.Split(",");
167+
var networkChangeAdapterList = settings.NetworkChangeAdapters.Split(",");
171168

172-
foreach (NetworkInterface n in adapters)
173-
{
174-
if(n.OperationalStatus == OperationalStatus.Up && networkChangeAdapterList.Contains(n.Id))
169+
foreach (NetworkInterface n in adapters)
175170
{
176-
status = PingTest();
171+
if (n.OperationalStatus == OperationalStatus.Up && networkChangeAdapterList.Contains(n.Id))
172+
{
173+
status = PingTest();
177174

178-
// Update staus text in console
179-
Clear();
175+
// Update staus text in console
176+
Clear();
180177

181-
if (status == IPStatus.Success)
182-
{
183-
EnableProxy();
184-
}
185-
else
186-
{
187-
DisableProxy();
178+
if (status == IPStatus.Success)
179+
{
180+
EnableProxy();
181+
}
182+
else
183+
{
184+
DisableProxy();
185+
}
188186
}
187+
//Console.WriteLine(" {0} is {1}", n.Name, n.OperationalStatus);
188+
//Console.WriteLine("Description is {0} [{1}]", n.Description, n.Id);
189189
}
190-
//Console.WriteLine(" {0} is {1}", n.Name, n.OperationalStatus);
191-
//Console.WriteLine("Description is {0} [{1}]", n.Description, n.Id);
192190
}
193191
}
194192

0 commit comments

Comments
 (0)