From 968ada21f213ece1376576d5e2e413577c0a03e4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=8D=8A=E5=9D=97=E6=A9=98=E5=AD=90?= <982654045@qq.com> Date: Fri, 8 Sep 2023 03:35:24 +0000 Subject: [PATCH] =?UTF-8?q?update=20src/main/java/org/noear/dami/TopicRout?= =?UTF-8?q?er.java.=20=E9=98=B2=E6=AD=A2=E5=A4=9A=E7=BA=BF=E7=A8=8B?= =?UTF-8?q?=E8=AE=A2=E9=98=85=E5=90=8C=E4=B8=80=E4=B8=AAtopic=20=E5=AF=BC?= =?UTF-8?q?=E8=87=B4=E5=85=B6=E4=B8=AD=E4=B8=80=E4=B8=AA=E8=A2=AB=E8=A6=86?= =?UTF-8?q?=E7=9B=96=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 半块橘子 <982654045@qq.com> --- src/main/java/org/noear/dami/TopicRouter.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/org/noear/dami/TopicRouter.java b/src/main/java/org/noear/dami/TopicRouter.java index 564fa59..1cb9fa0 100644 --- a/src/main/java/org/noear/dami/TopicRouter.java +++ b/src/main/java/org/noear/dami/TopicRouter.java @@ -24,7 +24,7 @@ public class TopicRouter { /** * 添加监听 */ - public void add(String topic, int index, TopicListener listener) { + public synchronized void add(String topic, int index, TopicListener listener) { assertTopic(topic); TopicListenPipeline pipeline = pipelineMap.get(topic); -- Gitee