Perhaps these applications do not notice a broken TCP connection. The timeout is used to detect a TCP connection failure, and I believe that the default timeout is quite long.
In the browser / OS, it should be noted that the connection is lost as soon as you try to send data. Try sending some data after disconnecting the network cable, see if this event fires.
Also, how long have you been waiting for the signal? The connection may have a long TCP timeout.
If you still do not receive a private event, this is probably due to an implementation error. If you absolutely need to know when the connection will break, use the ping mechanism with your timeout. I believe the websocket protocol defines its own ping protocol, maybe study this.
Also, for chrome, it seems for issue . Perhaps this will help you.
source share