Preventing endless alives after 8 seconds of disconnect
try {
socket.close();
} catch(e) {/* Socket already terminated */}
+ window.clearInterval(heartbeat_id);
+ last_server_heartbeat = null;
setup_socket();
}
