mirror of
https://github.com/bisq-network/bisq.git
synced 2024-11-19 01:41:11 +01:00
Set response time only in non error case
This commit is contained in:
parent
16880b2f6a
commit
86a853bfb9
@ -154,16 +154,17 @@ public class InventoryMonitor implements SetupListener {
|
|||||||
RequestInfo requestInfo,
|
RequestInfo requestInfo,
|
||||||
@Nullable Map<InventoryItem, String> result,
|
@Nullable Map<InventoryItem, String> result,
|
||||||
@Nullable String errorMessage) {
|
@Nullable String errorMessage) {
|
||||||
if (errorMessage != null) {
|
long responseTime = System.currentTimeMillis();
|
||||||
|
if (errorMessage != null && !errorMessage.isEmpty()) {
|
||||||
log.warn("Error at connection to peer {}: {}", nodeAddress, errorMessage);
|
log.warn("Error at connection to peer {}: {}", nodeAddress, errorMessage);
|
||||||
requestInfo.setErrorMessage(errorMessage);
|
requestInfo.setErrorMessage(errorMessage);
|
||||||
|
} else {
|
||||||
|
requestInfo.setResponseTime(responseTime);
|
||||||
}
|
}
|
||||||
|
|
||||||
boolean ignoreDeviationAtStartup;
|
boolean ignoreDeviationAtStartup;
|
||||||
if (result != null) {
|
if (result != null) {
|
||||||
log.info("nodeAddress={}, result={}", nodeAddress, result.toString());
|
log.info("nodeAddress={}, result={}", nodeAddress, result.toString());
|
||||||
long responseTime = System.currentTimeMillis();
|
|
||||||
requestInfo.setResponseTime(responseTime);
|
|
||||||
|
|
||||||
// If seed just started up we ignore the deviation as it can be expected that seed is still syncing
|
// If seed just started up we ignore the deviation as it can be expected that seed is still syncing
|
||||||
// DAO state/blocks. P2P data should be ready but as we received it from other seeds it is not that
|
// DAO state/blocks. P2P data should be ready but as we received it from other seeds it is not that
|
||||||
|
Loading…
Reference in New Issue
Block a user