fix reset on address lookup

This commit is contained in:
Stephen Birarda 2015-05-27 16:00:56 -07:00
parent e6e2c4b95d
commit 757d02a600

View file

@ -866,14 +866,18 @@ void LimitedNodeList::flagTimeForConnectionStep(ConnectionStep connectionStep) {
}
void LimitedNodeList::flagTimeForConnectionStep(ConnectionStep connectionStep, quint64 timestamp) {
if (!_areConnectionTimesComplete) {
if (connectionStep == ConnectionStep::LookupAddress) {
QWriteLocker writeLock(&_connectionTimeLock);
// we clear the current times if the user just fired off a lookup
_lastConnectionTimes.clear();
_areConnectionTimesComplete = false;
_lastConnectionTimes[timestamp] = connectionStep;
} else if (!_areConnectionTimesComplete) {
QWriteLocker writeLock(&_connectionTimeLock);
if (connectionStep == ConnectionStep::LookupAddress) {
// we clear the current times if the user just fired off a lookup
_lastConnectionTimes.clear();
_areConnectionTimesComplete = false;
}
// anything > than sending the first DS check should not come before the DS check in, so we drop those
// this handles the case where you lookup an address and get packets in the existing domain before changing domains