@Override
    public void afterConnectionClosed(final WebSocketSession session, final CloseStatus status) throws Exception {
        Object token = session.getAttributes().get("token");
        LOG.info("closed with status: {}", status);
        if (Objects.nonNull(token)) {
            // The user exits and removes the cache.
            WsSessionManager.remove(token.toString());
        }
    }
when socket disconnected.

@param session session
@param status  close status
@throws Exception exception
shenyu-examples/shenyu-examples-websocket/shenyu-example-spring-native-websocket/src/main/java/org/apache/shenyu/examples/websocket/handler/HttpAuthHandler.java