public static void removeAndClose(final String key) {
        WebSocketSession session = remove(key);
        if (Objects.nonNull(session)) {
            try {
                session.close();
            } catch (IOException e) {
                log.error("session:{} close failed !", key, e);
            }
        }
    }
Delete and close the connection synchronously.
@param key key
shenyu-examples/shenyu-examples-websocket/shenyu-example-spring-native-websocket/src/main/java/org/apache/shenyu/examples/websocket/config/WsSessionManager.java