From b820faecf688aeb7f6eea135eef450da08351942 Mon Sep 17 00:00:00 2001 From: iamironabbit Date: Wed, 21 Nov 2018 16:16:44 -0500 Subject: [PATCH] don't let multiple calls broadcast at the same time --- .../messenger/service/adapters/ChatSessionManagerAdapter.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/org/awesomeapp/messenger/service/adapters/ChatSessionManagerAdapter.java b/app/src/main/java/org/awesomeapp/messenger/service/adapters/ChatSessionManagerAdapter.java index 07b69cb6f..a9d06167b 100644 --- a/app/src/main/java/org/awesomeapp/messenger/service/adapters/ChatSessionManagerAdapter.java +++ b/app/src/main/java/org/awesomeapp/messenger/service/adapters/ChatSessionManagerAdapter.java @@ -234,7 +234,7 @@ public synchronized ChatSessionAdapter getChatSessionAdapter(ChatSession session class ChatSessionListenerAdapter implements ChatSessionListener { - public void onChatSessionCreated(ChatSession session) { + public synchronized void onChatSessionCreated(ChatSession session) { final IChatSession sessionAdapter = getChatSessionAdapter(session, false); final int N = mRemoteListeners.beginBroadcast(); if (N > 0) { @@ -251,7 +251,7 @@ public void onChatSessionCreated(ChatSession session) { } } - public void notifyChatSessionCreateFailed(final String name, final ImErrorInfo error) { + public synchronized void notifyChatSessionCreateFailed(final String name, final ImErrorInfo error) { final int N = mRemoteListeners.beginBroadcast(); if (N > 0) { for (int i = 0; i < N; i++) {