Skip to content

Commit c0f019c

Browse files
committed
fix(core): deterministic packet key assignment by sorting AvailablePacketTypes before AddKnownTypes
1 parent 491ef47 commit c0f019c

1 file changed

Lines changed: 10 additions & 1 deletion

File tree

Intersect (Core)/Core/ApplicationContext`2.cs

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
using Intersect.Threading;
33
using System.Collections.Concurrent;
44
using System.Diagnostics;
5+
using System.Globalization;
6+
using System.Linq;
57
using System.Reflection;
68
using Intersect.Framework.Reflection;
79
using Intersect.Properties;
@@ -237,7 +239,14 @@ public void Start(bool lockUntilShutdown = true)
237239
{
238240
BootstrapServices();
239241

240-
PackedIntersectPacket.AddKnownTypes(PacketHelper.AvailablePacketTypes);
242+
PackedIntersectPacket.AddKnownTypes(
243+
PacketHelper.AvailablePacketTypes
244+
.OrderBy(
245+
type => type.GetName(qualified: true),
246+
CultureInfo.InvariantCulture.CompareInfo.GetStringComparer(CompareOptions.Ordinal)
247+
)
248+
.ToList()
249+
);
241250

242251
try
243252
{

0 commit comments

Comments
 (0)