mirror of
https://github.com/esp8266/Arduino.git
synced 2025-06-19 09:42:11 +03:00
* Fixed memory leak when calling Ethernet.begin() multiple times
* Ensure the UDP socket is closed before trying to open it
This commit is contained in:
committed by
Cristian Maglie
parent
6dbc2bfc57
commit
cce70d269c
@ -43,6 +43,7 @@ int DhcpClass::request_DHCP_lease(){
|
||||
_dhcpTransactionId = random(1UL, 2000UL);
|
||||
_dhcpInitialTransactionId = _dhcpTransactionId;
|
||||
|
||||
_dhcpUdpSocket.stop();
|
||||
if (_dhcpUdpSocket.begin(DHCP_CLIENT_PORT) == 0)
|
||||
{
|
||||
// Couldn't get a socket
|
||||
|
Reference in New Issue
Block a user