We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6dbc2bf commit cce70d2Copy full SHA for cce70d2
libraries/Ethernet/Dhcp.cpp
@@ -43,6 +43,7 @@ int DhcpClass::request_DHCP_lease(){
43
_dhcpTransactionId = random(1UL, 2000UL);
44
_dhcpInitialTransactionId = _dhcpTransactionId;
45
46
+ _dhcpUdpSocket.stop();
47
if (_dhcpUdpSocket.begin(DHCP_CLIENT_PORT) == 0)
48
{
49
// Couldn't get a socket
libraries/Ethernet/Ethernet.cpp
@@ -10,7 +10,8 @@ uint16_t EthernetClass::_server_port[MAX_SOCK_NUM] = {
10
11
int EthernetClass::begin(uint8_t *mac_address)
12
13
- _dhcp = new DhcpClass();
+ static DhcpClass s_dhcp;
14
+ _dhcp = &s_dhcp;
15
16
17
// Initialise the basic info
0 commit comments