The TCP connection drops after quickly unplugging and replugging the Ethernet cable

YS P 0 Reputation points
2026-10-13T12:18:52.1633333+00:00

My PC is running Windows 10, acting as a TCP client that communicates with a controller functioning as the TCP server. After I quickly unplugged and reconnected the Ethernet cable, the TCP connection was already disconnected, and the system could no longer find this connection entry.

Packet capture results show that after the cable was reconnected, the controller sent data packets to the PC, but the PC responded with an RST (reset) packet.

Why does unplugging and replugging the network cable cause the TCP connection to drop? What methods can be used to keep the TCP connection persistently connected?

Windows for business | Windows Client for IT Pros | Networking | Other
0 comments No comments

1 answer

Sort by: Most helpful
  1. Tracy Le 13,690 Reputation points Independent Advisor
    2026-10-13T13:58:06.4033333+00:00

    Hello YS P,

    What you are seeing is expected TCP behavior. When the Ethernet link is unplugged, Windows detects a physical link loss and the existing TCP session becomes invalid. After the cable is reconnected, the controller may still believe the session exists and continue sending data, but the Windows TCP stack no longer has a matching connection state, so it responds with a TCP RST packet.

    In practice, there is no supported way to guarantee that a TCP session survives an actual link-down event caused by unplugging the network cable. The recommended approach is for the client application to detect the disconnection and automatically establish a new TCP connection when network connectivity returns.

    If reconnection needs to happen quickly, consider implementing TCP keepalives, application-level heartbeats, or automatic reconnect logic in the client software. Those mechanisms are typically used in industrial control and telemetry applications where temporary network interruptions are expected.

    If this helps, please accept the answer.

    Tracy Le.

    Was this answer helpful?


Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.