From ee6e4f96fb0aab36aa01a74934fa1f59f8cb51e8 Mon Sep 17 00:00:00 2001 From: heavyrian2012 Date: Fri, 21 Feb 2025 19:28:57 +0800 Subject: [PATCH] =?UTF-8?q?=E9=85=8D=E7=BD=AE=E5=85=81=E8=AE=B8=E6=92=A4?= =?UTF-8?q?=E5=9B=9E=E6=B6=88=E6=81=AF=E6=97=B6=E9=97=B4=E5=B0=8F=E4=BA=8E?= =?UTF-8?q?=E7=AD=89=E4=BA=8E0=E6=97=B6=E5=8F=AF=E4=BB=A5=E5=85=81?= =?UTF-8?q?=E8=AE=B8=E7=94=A8=E6=88=B7=E4=BB=BB=E6=84=8F=E6=97=B6=E9=97=B4?= =?UTF-8?q?=E6=92=A4=E5=9B=9E=E6=B6=88=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/io/moquette/persistence/MemoryMessagesStore.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/broker/src/main/java/io/moquette/persistence/MemoryMessagesStore.java b/broker/src/main/java/io/moquette/persistence/MemoryMessagesStore.java index 663caa071..9bab25b66 100755 --- a/broker/src/main/java/io/moquette/persistence/MemoryMessagesStore.java +++ b/broker/src/main/java/io/moquette/persistence/MemoryMessagesStore.java @@ -2454,7 +2454,7 @@ public ErrorCode recallMessage(long messageUid, String operatorId, String client } boolean isExpired = false; if (!canRecall && message.getFromUser().equals(operatorId)) { - if (now - message.getServerTimestamp() > mRecallTimeLimit * 1000) { + if (mRecallTimeLimit > 0 && now - message.getServerTimestamp() > mRecallTimeLimit * 1000) { isExpired = true; } else { canRecall = true;