mirror of
https://github.com/overte-org/overte.git
synced 2025-04-15 16:02:08 +02:00
Move rebind on network error to rebind on silent domain checkin
This commit is contained in:
parent
d0bd4a7d47
commit
6643633400
2 changed files with 6 additions and 4 deletions
|
@ -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) {
|
||||
|
|
|
@ -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) {
|
||||
|
|
Loading…
Reference in a new issue