Skip to content

Commit fdf1ddc

Browse files
PerkinsZhuocram
authored andcommitted
Do not send queued messages repeatedly because they are never cleared
1 parent af8e26c commit fdf1ddc

File tree

1 file changed

+2
-1
lines changed
  • Source/library/src/main/java/im/delight/android/ddp

1 file changed

+2
-1
lines changed

Source/library/src/main/java/im/delight/android/ddp/Meteor.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1241,7 +1241,8 @@ private void announceSessionReady(final boolean signedInAutomatically) {
12411241
mCallbackProxy.onConnect(signedInAutomatically);
12421242

12431243
// try to dispatch queued messages now
1244-
for (String queuedMessage : mQueuedMessages) {
1244+
String queuedMessage = null;
1245+
while ((queuedMessage = mQueuedMessages.poll()) != null) {
12451246
send(queuedMessage);
12461247
}
12471248
}

0 commit comments

Comments
 (0)