mirror of
https://gitlab.com/veilid/veilid.git
synced 2024-10-01 01:26:08 -04:00
last connection work
This commit is contained in:
parent
5e1176db5a
commit
292712671a
@ -81,15 +81,20 @@ impl DiscoveryContext {
|
|||||||
let res = network_result_value_or_log!(debug match rpc.rpc_call_status(node_ref.clone()).await {
|
let res = network_result_value_or_log!(debug match rpc.rpc_call_status(node_ref.clone()).await {
|
||||||
Ok(v) => v,
|
Ok(v) => v,
|
||||||
Err(e) => {
|
Err(e) => {
|
||||||
|
node_ref.clear_last_connection();
|
||||||
log_net!(error
|
log_net!(error
|
||||||
"failed to get status answer from {:?}: {}",
|
"failed to get status answer from {:?}: {}",
|
||||||
node_ref, e
|
node_ref, e
|
||||||
);
|
);
|
||||||
return None;
|
return None;
|
||||||
}
|
}
|
||||||
} => { return None; }
|
} => {
|
||||||
|
node_ref.clear_last_connection();
|
||||||
|
return None;
|
||||||
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
|
node_ref.clear_last_connection();
|
||||||
log_net!(
|
log_net!(
|
||||||
"request_public_address {:?}: Value({:?})",
|
"request_public_address {:?}: Value({:?})",
|
||||||
node_ref,
|
node_ref,
|
||||||
@ -196,13 +201,16 @@ impl DiscoveryContext {
|
|||||||
node_ref.set_filter(None);
|
node_ref.set_filter(None);
|
||||||
|
|
||||||
// ask the node to send us a dial info validation receipt
|
// ask the node to send us a dial info validation receipt
|
||||||
rpc.rpc_call_validate_dial_info(node_ref.clone(), dial_info, redirect)
|
let out = rpc
|
||||||
|
.rpc_call_validate_dial_info(node_ref.clone(), dial_info, redirect)
|
||||||
.await
|
.await
|
||||||
.map_err(logthru_net!(
|
.map_err(logthru_net!(
|
||||||
"failed to send validate_dial_info to {:?}",
|
"failed to send validate_dial_info to {:?}",
|
||||||
node_ref
|
node_ref
|
||||||
))
|
))
|
||||||
.unwrap_or(false)
|
.unwrap_or(false);
|
||||||
|
node_ref.clear_last_connection();
|
||||||
|
out
|
||||||
}
|
}
|
||||||
|
|
||||||
#[instrument(level = "trace", skip(self), ret)]
|
#[instrument(level = "trace", skip(self), ret)]
|
||||||
|
Loading…
Reference in New Issue
Block a user