1
zj
2024-08-22 f6f8e78aff9d221e8e7b018f30b52563398ad6ea
1
1 files modified
6 ■■■■ changed files
websocketSerivce/src/main/java/org/example/websocket/server/WsServer.java 6 ●●●● patch | view | raw | blame | history
websocketSerivce/src/main/java/org/example/websocket/server/WsServer.java
@@ -226,9 +226,10 @@
        }
        if (!CollectionUtils.isEmpty(currencies)) {
            Set<String> filtrationSet = currencies.stream()
                    .map(f -> f.getCurrency() + f.getBuy() + f.getSell())
//                    .map(f -> f.getCurrency() + f.getBuy() + f.getSell()) //组合过滤 ,暂时不使用,直接过滤整个币种
                    .map(f -> f.getCurrency())
                    .collect(Collectors.toSet());
            redisValueMap.removeIf(data -> filtrationSet.contains(data.getBuyAndSell()));
            redisValueMap.removeIf(data -> filtrationSet.contains(data.getBaseAsset()));
        }
@@ -348,7 +349,6 @@
    // 关闭会话的方法
    private void closeSession(Session session, String reason) {
        threadLocalData.remove(session.getId());
        wsServers.remove(this);
        log.info(reason);
        onClose();