You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am using smoltcp on a device setup to accept 4 TCP connections at the same time on the same port(plus one DHCP connection if that makes any difference) and I am able to connect to the device from a pc with a simple program I made(not using smoltcp, I've also tested with telnet), even multiple connections at the same time. However when closing the connection on the pc side the socket on the device with smoltcp doesn't close until it receives an RST from somewhere, which makes the socket unable to accept a new connection until it resets. This means I can make 4 connections and even if I've closed all 4 on the pc side the next connection isn't accepted until the first socket is reset.
My knowledge is limited I admit but from my understanding shouldn't the sockets on both sides do some kind of FIN/ACK exchange and then the sockets close and then are able to accept a new connection?
Should I explicitly close the socket on the smoltcp side? If so, where would I do that? I only want the connection to close when the pc client closes its connection.
My simple program panics when trying to connect for the 5th time with the following message: code: 10061, kind: ConnectionRefused, message: "No connection could be made because the target machine actively refused it."
Which I guess makes sense since no socket on the device is technically available.
Might as well mention that I am using a w5500 on the device in case that matters in any way.
Here's the most relevant parts of my code(let me know if you need anything else):
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Hello,
I am using smoltcp on a device setup to accept 4 TCP connections at the same time on the same port(plus one DHCP connection if that makes any difference) and I am able to connect to the device from a pc with a simple program I made(not using smoltcp, I've also tested with telnet), even multiple connections at the same time. However when closing the connection on the pc side the socket on the device with smoltcp doesn't close until it receives an RST from somewhere, which makes the socket unable to accept a new connection until it resets. This means I can make 4 connections and even if I've closed all 4 on the pc side the next connection isn't accepted until the first socket is reset.
My knowledge is limited I admit but from my understanding shouldn't the sockets on both sides do some kind of FIN/ACK exchange and then the sockets close and then are able to accept a new connection?
Should I explicitly close the socket on the smoltcp side? If so, where would I do that? I only want the connection to close when the pc client closes its connection.
My simple program panics when trying to connect for the 5th time with the following message:
code: 10061, kind: ConnectionRefused, message: "No connection could be made because the target machine actively refused it."
Which I guess makes sense since no socket on the device is technically available.
Might as well mention that I am using a w5500 on the device in case that matters in any way.
Here's the most relevant parts of my code(let me know if you need anything else):
Beta Was this translation helpful? Give feedback.
All reactions