diff --git a/libraries/networking/src/udt/Connection.cpp b/libraries/networking/src/udt/Connection.cpp index c640392263..c44c0f4221 100644 --- a/libraries/networking/src/udt/Connection.cpp +++ b/libraries/networking/src/udt/Connection.cpp @@ -72,7 +72,7 @@ SendQueue& Connection::getSendQueue() { QObject::connect(_sendQueue.get(), &SendQueue::packetSent, this, &Connection::packetSent); QObject::connect(_sendQueue.get(), &SendQueue::packetSent, this, &Connection::recordSentPackets); QObject::connect(_sendQueue.get(), &SendQueue::packetRetransmitted, this, &Connection::recordRetransmission); - QObject::connect(_sendQueue.get(), &SendQueue::queueInnactive, this, &Connection::queueInnactive); + QObject::connect(_sendQueue.get(), &SendQueue::queueInactive, this, &Connection::queueInactive); // set defaults on the send queue from our congestion control object _sendQueue->setPacketSendPeriod(_congestionControl->_packetSendPeriod); @@ -82,8 +82,8 @@ SendQueue& Connection::getSendQueue() { return *_sendQueue; } -void Connection::queueInnactive() { - emit connectionInnactive(_destination); +void Connection::queueInactive() { + emit connectionInactive(_destination); } void Connection::sendReliablePacket(std::unique_ptr packet) { diff --git a/libraries/networking/src/udt/Connection.h b/libraries/networking/src/udt/Connection.h index fd7cd5ef88..ef713ea0c5 100644 --- a/libraries/networking/src/udt/Connection.h +++ b/libraries/networking/src/udt/Connection.h @@ -73,12 +73,12 @@ public: signals: void packetSent(); - void connectionInnactive(HifiSockAddr sockAdrr); + void connectionInactive(HifiSockAddr sockAdrr); private slots: void recordSentPackets(int payload, int total); void recordRetransmission(); - void queueInnactive(); + void queueInactive(); private: void sendACK(bool wasCausedBySyncTimeout = true); diff --git a/libraries/networking/src/udt/SendQueue.cpp b/libraries/networking/src/udt/SendQueue.cpp index 1ee8cce48a..93212770e5 100644 --- a/libraries/networking/src/udt/SendQueue.cpp +++ b/libraries/networking/src/udt/SendQueue.cpp @@ -254,12 +254,12 @@ void SendQueue::run() { } if (!sentAPacket) { - static const std::chrono::seconds CONSIDER_INNACTIVE_AFTER { 5 }; + static const std::chrono::seconds CONSIDER_INACTIVE_AFTER { 5 }; - if (flowWindowFull && (clock::now() - _flowWindowFullSince) > CONSIDER_INNACTIVE_AFTER) { - // If the flow window has been full for over CONSIDER_INNACTIVE_AFTER, - // then signal the queue is innactive - emit queueInnactive(); + if (flowWindowFull && (clock::now() - _flowWindowFullSince) > CONSIDER_INACTIVE_AFTER) { + // If the flow window has been full for over CONSIDER_INACTIVE_AFTER, + // then signal the queue is inactive + emit queueInactive(); } else { // During our processing above we didn't send any packets and the flow window is not full. @@ -270,12 +270,12 @@ void SendQueue::run() { // The packets queue and loss list mutexes are now both locked - check if they're still both empty if (doubleLock.try_lock() && _packets.empty() && _naks.getLength() == 0) { // both are empty - let's use a condition_variable_any to wait - auto cvStatus = _emptyCondition.wait_for(doubleLock, CONSIDER_INNACTIVE_AFTER); + auto cvStatus = _emptyCondition.wait_for(doubleLock, CONSIDER_INACTIVE_AFTER); - // Check if we've been innactive for too long + // Check if we've been inactive for too long if (cvStatus == std::cv_status::timeout) { - emit queueInnactive(); + emit queueInactive(); } // we have the double lock again - it'll be unlocked once it goes out of scope diff --git a/libraries/networking/src/udt/SendQueue.h b/libraries/networking/src/udt/SendQueue.h index cf20e03f20..8e8f3e4c89 100644 --- a/libraries/networking/src/udt/SendQueue.h +++ b/libraries/networking/src/udt/SendQueue.h @@ -68,7 +68,7 @@ signals: void packetSent(int dataSize, int payloadSize); void packetRetransmitted(); - void queueInnactive(); + void queueInactive(); private slots: void run(); @@ -105,7 +105,7 @@ private: std::atomic _flowWindowSize { 0 }; // Flow control window size (number of packets that can be on wire) - set from CC - // Used to detect when the connection becomes innactive for too long + // Used to detect when the connection becomes inactive for too long bool _flowWindowWasFull = false; time_point _flowWindowFullSince; diff --git a/libraries/networking/src/udt/Socket.cpp b/libraries/networking/src/udt/Socket.cpp index f423353836..7bdfc55398 100644 --- a/libraries/networking/src/udt/Socket.cpp +++ b/libraries/networking/src/udt/Socket.cpp @@ -147,7 +147,7 @@ Connection& Socket::findOrCreateConnection(const HifiSockAddr& sockAddr) { if (it == _connectionsHash.end()) { auto connection = std::unique_ptr(new Connection(this, sockAddr, _ccFactory->create())); - QObject::connect(connection.get(), &Connection::connectionInnactive, this, &Socket::cleanupConnection); + QObject::connect(connection.get(), &Connection::connectionInactive, this, &Socket::cleanupConnection); it = _connectionsHash.insert(it, std::make_pair(sockAddr, std::move(connection))); }