Merge pull request #13045 from SimonWalton-HiFi/domain-checkins-tweak

Reset pending domain check-in count more frequently
This commit is contained in:
Stephen Birarda 2018-05-11 13:31:03 -07:00 committed by GitHub
commit 4f7ce7345d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 2 deletions

View file

@ -97,7 +97,7 @@ public:
int getCheckInPacketsSinceLastReply() const { return _checkInPacketsSinceLastReply; }
void sentCheckInPacket();
void domainListReceived() { _checkInPacketsSinceLastReply = 0; }
void clearPendingCheckins() { _checkInPacketsSinceLastReply = 0; }
/**jsdoc
* <p>The reasons that you may be refused connection to a domain are defined by numeric values:</p>

View file

@ -594,6 +594,8 @@ void NodeList::processDomainServerConnectionTokenPacket(QSharedPointer<ReceivedM
}
// read in the connection token from the packet, then send domain-server checkin
_domainHandler.setConnectionToken(QUuid::fromRfc4122(message->readWithoutCopy(NUM_BYTES_RFC4122_UUID)));
_domainHandler.clearPendingCheckins();
sendDomainServerCheckIn();
}
@ -605,7 +607,7 @@ void NodeList::processDomainServerList(QSharedPointer<ReceivedMessage> message)
}
// this is a packet from the domain server, reset the count of un-replied check-ins
_domainHandler.domainListReceived();
_domainHandler.clearPendingCheckins();
// emit our signal so listeners know we just heard from the DS
emit receivedDomainServerList();