Skip to content

Update EthernetClient.cpp #94

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Feb 7, 2025
Merged

Update EthernetClient.cpp #94

merged 2 commits into from
Feb 7, 2025

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 <68175738+q1098401179@users.noreply.github.com>
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 <frederic.pillon@st.com>
@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