A web app uses an SSL-encrypted WebSocket to communicate with a web server (wss://). Imagine a situation when the certificate expires some time after the socket is open.
As per this answer, for a regular communication with HTTPS without websockets this does not seem to be a problem, as far as the certificate validity is checked at the TLS/SSL handshake at the beginning.
Since the sockets assume some persistence and may remain open for a long time, I am wondering what would happen on the client side in this situation.
How a modern web-browser would behave? Do we need to treat this corner case with a particular care, i.e., meter programmatically the expiration time and force the websocket to reconnect when the moment comes, assuming the certificate has been updated on the server some time before)?