forked from Qortal/qortal
Wait until a successful connection with a peer before tracking the direct request.
This commit is contained in:
parent
ba70e457b6
commit
498ca29aab
@ -303,9 +303,6 @@ public class ArbitraryDataFileManager extends Thread {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// We have at least one peer, so mark this as a request in progress
|
|
||||||
ArbitraryDataFileListManager.getInstance().addToSignatureRequests(signature58, false, true);
|
|
||||||
|
|
||||||
LOGGER.debug("Attempting a direct peer connection for signature {}...", signature58);
|
LOGGER.debug("Attempting a direct peer connection for signature {}...", signature58);
|
||||||
|
|
||||||
// Peers found, so pick a random one and request data from it
|
// Peers found, so pick a random one and request data from it
|
||||||
@ -360,6 +357,11 @@ public class ArbitraryDataFileManager extends Thread {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (success) {
|
||||||
|
// We were able to connect with a peer, so track the request
|
||||||
|
ArbitraryDataFileListManager.getInstance().addToSignatureRequests(signature58, false, true);
|
||||||
|
}
|
||||||
|
|
||||||
return success;
|
return success;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user