On Windows, sockets without sending data are a big source of problems in many applications and must be handled correctly.
The problem is that the SO_KEEPALIVE period can be set at the system scale (otherwise it will be useless by default for two hours) or with the later winsock API.
Therefore, many applications sometimes and individually send some random data byte (to ignore the peer) only so that the network layer declares the disconnect after the ACK has not been received (after all proper retransmissions by the layer and ack timeout) .
Answering your question: no, sockets are not automatically disabled.
However, you must be careful with the above problem. What makes it even more complicated is that testing this behavior is very difficult. For example, if you configured everything correctly, and you expect to detect a shutdown properly, you cannot test it by disabling the physical layer. This is due to the fact that the network adapter will perceive carrier loss, and the socket level will signal to close all application sockets that relied on it. A good way to check this is to connect two computers with three legs and two switches between them, disconnecting the middle leg, thereby preventing loss of media, but still physically shutting down the machines.
source share