From f15d87fff1527b7e21d7833722fe1063a08a24cd Mon Sep 17 00:00:00 2001 From: David Rowe Date: Thu, 14 Oct 2021 13:38:30 +1300 Subject: [PATCH] Remove unused code --- libraries/networking/src/udt/Connection.cpp | 9 --------- libraries/networking/src/udt/Connection.h | 3 --- 2 files changed, 12 deletions(-) diff --git a/libraries/networking/src/udt/Connection.cpp b/libraries/networking/src/udt/Connection.cpp index 66bf3f6613..4c05e8af91 100644 --- a/libraries/networking/src/udt/Connection.cpp +++ b/libraries/networking/src/udt/Connection.cpp @@ -417,9 +417,6 @@ void Connection::resetReceiveState() { // clear the loss list _lossList.clear(); - // clear sync variables - _connectionStart = p_high_resolution_clock::now(); - // clear any pending received messages for (auto& pendingMessage : _pendingReceivedMessages) { _parentSocket->messageFailed(this, pendingMessage.first); @@ -451,12 +448,6 @@ void PendingReceivedMessage::enqueuePacket(std::unique_ptr packet) { "PendingReceivedMessage::enqueuePacket", "called with a packet that is not part of a message"); - if (packet->getPacketPosition() == Packet::PacketPosition::LAST || - packet->getPacketPosition() == Packet::PacketPosition::ONLY) { - _hasLastPacket = true; - _numPackets = packet->getMessagePartNumber() + 1; - } - // Insert into the packets list in sorted order. Because we generally expect to receive packets in order, begin // searching from the end of the list. auto messagePartNumber = packet->getMessagePartNumber(); diff --git a/libraries/networking/src/udt/Connection.h b/libraries/networking/src/udt/Connection.h index 2869b7f57d..a7904cba23 100644 --- a/libraries/networking/src/udt/Connection.h +++ b/libraries/networking/src/udt/Connection.h @@ -43,9 +43,7 @@ public: std::list> _packets; private: - bool _hasLastPacket { false }; Packet::MessagePartNumber _nextPartNumber = 0; - unsigned int _numPackets { 0 }; }; class Connection : public QObject { @@ -112,7 +110,6 @@ private: bool _hasReceivedHandshakeACK { false }; // flag for receipt of handshake ACK from client bool _didRequestHandshake { false }; // flag for request of handshake from server - p_high_resolution_clock::time_point _connectionStart = p_high_resolution_clock::now(); // holds the time_point for creation of this connection p_high_resolution_clock::time_point _lastReceiveTime; // holds the last time we received anything from sender SequenceNumber _initialSequenceNumber; // Randomized on Connection creation, identifies connection during re-connect requests