Skip to content

Commit 1c1908d

Browse files
authored
Workaround for unintentional reset on UpdateConfiguration (#362)
1 parent 2d8a797 commit 1c1908d

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

nanoFramework.System.Net/NetworkInformation/NetworkInterface.cs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -209,8 +209,11 @@ public void EnableDhcp()
209209
{
210210
try
211211
{
212-
_startupAddressMode = AddressMode.DHCP;
213-
UpdateConfiguration((int)UpdateOperation.Dhcp);
212+
if (_startupAddressMode != AddressMode.DHCP)
213+
{
214+
_startupAddressMode = AddressMode.DHCP;
215+
UpdateConfiguration((int)UpdateOperation.Dhcp);
216+
}
214217
}
215218
finally
216219
{

0 commit comments

Comments
 (0)