Kaynağa Gözat

fix:
未读消息数量不准确bug

18339543638 2 yıl önce
ebeveyn
işleme
2c6e2382d2

+ 1 - 0
nb-im/src/main/java/com/nb/im/room/ImRoomOperator.java

@@ -54,6 +54,7 @@ public class ImRoomOperator {
     private synchronized void initMaxSort(){
         if(this.atomicLong==null){
             this.atomicLong = redissonClient.getAtomicLong("im:incr." + id);
+            atomicLong.expire(Duration.of(40,ChronoUnit.DAYS));
             atomicLong.getAsync()
                     .thenAcceptAsync(count->{
                         if(count==null){