3
0
Fork 0
mirror of https://github.com/lubosz/overte.git synced 2025-04-27 00:35:37 +02:00

only prepare packet list packets if they need a message number

This commit is contained in:
Stephen Birarda 2016-07-13 14:17:42 -07:00
parent cc9b72daa4
commit 30f55418db

View file

@ -65,7 +65,9 @@ void PacketQueue::queuePacket(PacketPointer packet) {
}
void PacketQueue::queuePacketList(PacketListPointer packetList) {
packetList->preparePackets(getNextMessageNumber());
if (packetList->isOrdered()) {
packetList->preparePackets(getNextMessageNumber());
}
LockGuard locker(_packetsLock);
_channels.push_back(std::move(packetList->_packets));