Skip to content

Commit

Permalink
Updated channelAttached presence logic for queuing messages
Browse files Browse the repository at this point in the history
  • Loading branch information
sacOO7 committed Sep 12, 2023
1 parent b7dd949 commit a85f3c6
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions src/IO.Ably.Shared/Realtime/Presence.cs
Original file line number Diff line number Diff line change
Expand Up @@ -723,15 +723,6 @@ internal void ChannelSuspended(ErrorInfo error)

internal void ChannelAttached(ProtocolMessage attachedMessage, bool isAttachWithoutMessageLoss = true)
{
// RTP5b
SendQueuedMessages();

// RTP17f
if (isAttachWithoutMessageLoss)
{
EnterMembersFromInternalPresenceMap();
}

// RTP19
StartSync();

Expand All @@ -751,6 +742,15 @@ internal void ChannelAttached(ProtocolMessage attachedMessage, bool isAttachWith
{
EndSync(); // RTP19
}

// RTP5b
SendQueuedMessages();

// RTP17f
if (isAttachWithoutMessageLoss)
{
EnterMembersFromInternalPresenceMap();
}
}

private void SendQueuedMessages()
Expand Down

0 comments on commit a85f3c6

Please sign in to comment.