mirror of
https://github.com/overte-org/overte.git
synced 2025-04-22 11:53:28 +02:00
don't process duplicate or pre-handshake packets
This commit is contained in:
parent
458a90d9e1
commit
8ebcb03b2b
1 changed files with 7 additions and 3 deletions
|
@ -221,9 +221,13 @@ void Socket::readPendingDatagrams() {
|
|||
if (packet->isReliable()) {
|
||||
// if this was a reliable packet then signal the matching connection with the sequence number
|
||||
auto& connection = findOrCreateConnection(senderSockAddr);
|
||||
connection.processReceivedSequenceNumber(packet->getSequenceNumber(),
|
||||
packet->getDataSize(),
|
||||
packet->getPayloadSize());
|
||||
|
||||
if (!connection.processReceivedSequenceNumber(packet->getSequenceNumber(),
|
||||
packet->getDataSize(),
|
||||
packet->getPayloadSize())) {
|
||||
// the connection indicated that we should not continue processing this packet
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if (packet->isPartOfMessage()) {
|
||||
|
|
Loading…
Reference in a new issue