Skip to content

Commit 2ef9178

Browse files
authored
Merge pull request #232 from nanoframework/AdrianSoundy-patch-1
Only Enable DHCP if required
2 parents 42ac826 + d4f6537 commit 2ef9178

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

nanoFramework.System.Net/NetworkHelper/NetworkHelperInternal.cs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,11 @@ public static void InternalSetupHelper(
9292
}
9393
else
9494
{
95-
networkInterface.EnableDhcp();
95+
if (!networkInterface.IsDhcpEnabled)
96+
{
97+
networkInterface.EnableDhcp();
98+
}
99+
96100
networkInterface.EnableAutomaticDns();
97101
}
98102
}

0 commit comments

Comments
 (0)