Skip to content

Disconnecting will not release Socket in W5500 #379

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

Open
tarnak opened this issue Feb 15, 2025 · 0 comments
Open

Disconnecting will not release Socket in W5500 #379

tarnak opened this issue Feb 15, 2025 · 0 comments

Comments

@tarnak
Copy link

tarnak commented Feb 15, 2025

Hi,

I've found an problem when using your library on rp2040 and W5500. As this hardware has only 8 sockets available, after 8 connections/disconnections you will be not able to connect until Socket will timeout itself.
I'm not sure is this issue in W5500 itself or in Ethernet library 2.0.1 which I'm using.

I've found an solution, you need to uncomment deletion of tcpclient in ModbusTCPTemplate.h

`
template <class SERVER, class CLIENT>
void ModbusTCPTemplate<SERVER, CLIENT>::cleanupConnections()

template <class SERVER, class CLIENT>
bool ModbusTCPTemplate<SERVER, CLIENT>::disconnect(IPAddress ip)
`
Seems like stop() is not working well for W5500.

Thanks and keep such a great job, sir.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant