diff --git a/src/IO.Ably.Shared/Extensions/PresenceExtensions.cs b/src/IO.Ably.Shared/Extensions/PresenceExtensions.cs index 49d13126b..1229674b9 100644 --- a/src/IO.Ably.Shared/Extensions/PresenceExtensions.cs +++ b/src/IO.Ably.Shared/Extensions/PresenceExtensions.cs @@ -13,7 +13,7 @@ public static bool IsNewerThan(this PresenceMessage thisMessage, PresenceMessage // RTP2b1 if (thisMessage.IsSynthesized() || thatMessage.IsSynthesized()) { - return thisMessage.Timestamp > thatMessage.Timestamp; + return thisMessage.Timestamp >= thatMessage.Timestamp; } // RTP2b2 @@ -35,7 +35,7 @@ public static bool IsNewerThan(this PresenceMessage thisMessage, PresenceMessage if (msgSerialThis == msgSerialThat) { - return indexThis > indexThat; + return indexThis >= indexThat; } return msgSerialThis > msgSerialThat; diff --git a/src/IO.Ably.Shared/Realtime/RecoveryKeyContext.cs b/src/IO.Ably.Shared/Realtime/RecoveryKeyContext.cs index db1da65ac..d55ec9427 100644 --- a/src/IO.Ably.Shared/Realtime/RecoveryKeyContext.cs +++ b/src/IO.Ably.Shared/Realtime/RecoveryKeyContext.cs @@ -26,9 +26,9 @@ public static RecoveryKeyContext Decode(string recover, ILogger logger = null) { return JsonHelper.Deserialize(recover); } - catch (Exception) + catch (Exception e) { - logger?.Warning($"Error deserializing recover - {recover}, setting it as null"); + logger?.Warning($"Error deserializing recover - {recover}, setting it as null", e); return null; } }