Skip to content

Conversation

TingRuazhang
Copy link
Contributor

void EthernetClient::stop()
{
if (_tcp_client == NULL) {
return;
}

// close tcp connection if not closed yet
if (status() != TCP_CLOSING) {
tcp_connection_close(_tcp_client->pcb, _tcp_client);
}
mem_free(_tcp_client);
}

In this function, memefree (_tcp_cient);, After release, the _tcp_cient was not set to NULL, which caused an exception when TCPClient was reconnected. After adding it, it worked normally.

Signed-off-by: TingRua zhang <[email protected]>
Copy link
Member

@fpistm fpistm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thanks

@fpistm fpistm added the fix 🩹 Bug fix label Feb 7, 2025
@fpistm fpistm added this to the 1.4.1/1.5.0 milestone Feb 7, 2025
@fpistm fpistm linked an issue Feb 7, 2025 that may be closed by this pull request
Signed-off-by: Frederic Pillon <[email protected]>
@fpistm fpistm merged commit b44edf6 into stm32duino:main Feb 7, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fix 🩹 Bug fix
Projects
Development

Successfully merging this pull request may close these issues.

EthernetClient BUG
2 participants