diff --git a/libraries/networking/src/NodeList.cpp b/libraries/networking/src/NodeList.cpp index 038d656dbb..0e6b5503d7 100644 --- a/libraries/networking/src/NodeList.cpp +++ b/libraries/networking/src/NodeList.cpp @@ -438,7 +438,13 @@ void NodeList::sendDomainServerCheckIn() { // Send duplicate check-ins in the exponentially increasing sequence 1, 1, 2, 4, ... static const int MAX_CHECKINS_TOGETHER = 20; + static const int REBIND_CHECKIN_COUNT = 2; int outstandingCheckins = _domainHandler.getCheckInPacketsSinceLastReply(); + + if (outstandingCheckins > REBIND_CHECKIN_COUNT) { + _nodeSocket.rebind(); + } + int checkinCount = outstandingCheckins > 1 ? std::pow(2, outstandingCheckins - 2) : 1; checkinCount = std::min(checkinCount, MAX_CHECKINS_TOGETHER); for (int i = 1; i < checkinCount; ++i) { diff --git a/libraries/networking/src/udt/Socket.cpp b/libraries/networking/src/udt/Socket.cpp index c73ac8109f..0abe1eb172 100644 --- a/libraries/networking/src/udt/Socket.cpp +++ b/libraries/networking/src/udt/Socket.cpp @@ -508,10 +508,6 @@ void Socket::handleSocketError(QAbstractSocket::SocketError socketError) { int nodeListQueueSize = ::hifi::qt::getEventQueueSize(thread()); qCDebug(networking) << "Networking queue size - " << nodeListQueueSize; #endif // DEBUG_EVENT_QUEUE - - if (_udpSocket.state() == QAbstractSocket::BoundState) { - rebind(); - } } void Socket::handleStateChanged(QAbstractSocket::SocketState socketState) {