mirror of
https://github.com/overte-org/overte.git
synced 2025-04-23 23:33:26 +02:00
Merge branch 'protocol' of https://github.com/Atlante45/hifi into atp
This commit is contained in:
commit
036cb8859d
3 changed files with 5 additions and 9 deletions
|
@ -17,7 +17,7 @@ using namespace udt;
|
|||
using namespace std;
|
||||
|
||||
void LossList::append(SequenceNumber seq) {
|
||||
assert(_lossList.back().second < seq);
|
||||
assert(_lossList.empty() || _lossList.back().second < seq);
|
||||
|
||||
if (getLength() > 0 && _lossList.back().second + 1 == seq) {
|
||||
++_lossList.back().second;
|
||||
|
|
|
@ -45,12 +45,12 @@ public:
|
|||
}
|
||||
inline SequenceNumber operator++(int) {
|
||||
SequenceNumber before = *this;
|
||||
(*this)++;
|
||||
++(*this);
|
||||
return before;
|
||||
}
|
||||
inline SequenceNumber operator--(int) {
|
||||
SequenceNumber before = *this;
|
||||
(*this)--;
|
||||
--(*this);
|
||||
return before;
|
||||
}
|
||||
|
||||
|
|
|
@ -162,12 +162,8 @@ void Socket::readPendingDatagrams() {
|
|||
|
||||
if (packet->isReliable()) {
|
||||
// if this was a reliable packet then signal the matching connection with the sequence number
|
||||
// assuming it exists
|
||||
auto it = _connectionsHash.find(senderSockAddr);
|
||||
|
||||
if (it != _connectionsHash.end()) {
|
||||
it->second->processReceivedSequenceNumber(packet->getSequenceNumber());
|
||||
}
|
||||
auto connection = findOrCreateConnection(senderSockAddr);
|
||||
connection->processReceivedSequenceNumber(packet->getSequenceNumber());
|
||||
}
|
||||
|
||||
if (_packetHandler) {
|
||||
|
|
Loading…
Reference in a new issue