Duplicate domain check-ins after timeouts

This commit is contained in:
Simon Walton 2018-06-07 11:47:29 -07:00
parent b7069fff71
commit dafd97b6f4

View file

@ -419,6 +419,12 @@ void NodeList::sendDomainServerCheckIn() {
flagTimeForConnectionStep(LimitedNodeList::ConnectionStep::SendDSCheckIn);
int outstandingCheckins = _domainHandler.getCheckInPacketsSinceLastReply();
int checkinCount = outstandingCheckins > 1 ? std::pow(2, outstandingCheckins - 1) : 1;
for (int i = 1; i < checkinCount; ++i) {
auto packetCopy = domainPacket->createCopy(*domainPacket);
sendPacket(std::move(packetCopy), _domainHandler.getSockAddr());
}
sendPacket(std::move(domainPacket), _domainHandler.getSockAddr());
// let the domain handler know we sent another check in or connect packet