smoltcp icon indicating copy to clipboard operation
smoltcp copied to clipboard

Incomplete TCP Handshake/Teardown Handling

Open Zeroc0077 opened this issue 8 months ago • 1 comments

When a TCP connection experiences an incomplete handshake or teardown (FIN) packet reception, the protocol stack remains in the connected state and continues to send FIN+ACK packets. The mainstream approach is if a TCP connection does not receive a complete handshake or teardown sequence, it should transition to a closed state after sending a specified number of probe packets. Currently, smoltcp maintains the connection state and sends FIN+ACK packets indefinitely, which can lead to resource leaks and unexpected behavior in applications relying on proper TCP state management.

Zeroc0077 avatar Apr 01 '25 12:04 Zeroc0077

You have to configure a timeout in the socket for it to timeout.

Dirbaio avatar Apr 01 '25 12:04 Dirbaio