Deal with SockJS disconnection better.