diff --git a/Assets/Scripts/TeaNet/Peers/ConnectionManager.cs b/Assets/Scripts/TeaNet/Peers/ConnectionManager.cs index 1a3fe93..47c0096 100644 --- a/Assets/Scripts/TeaNet/Peers/ConnectionManager.cs +++ b/Assets/Scripts/TeaNet/Peers/ConnectionManager.cs @@ -86,8 +86,8 @@ namespace NeonTea.Quakeball.TeaNet.Peers { Protocol protocol = Peer.GetProtocol(conn.Internal.AssignedProtocol); if (protocol != null && conn.IsReady()) { ByteBuffer buffer = protocol.BuildMessage(conn); - List list = PacketQueue[uid]; - buffer.Write(list.Count); + Packet[] list = PacketQueue[uid].ToArray(); + buffer.Write(list.Length); foreach (Packet p in list) { buffer.WritePacket(protocol, p); }