mirror of
https://github.com/telemt/telemt.git
synced 2026-09-21 01:58:23 +03:00
WEB Carriers negotiation and lane lifecycle bounds hardened
Co-Authored-By: brekotis <93345790+brekotis@users.noreply.github.com>
This commit is contained in:
@@ -80,7 +80,7 @@ impl WebProcessRuntime {
|
||||
class: CarrierClientClass,
|
||||
client_ip: IpAddr,
|
||||
identity: TraceIdentity,
|
||||
) {
|
||||
) -> bool {
|
||||
let mut state = self.state.lock();
|
||||
let scores = state.bootstraps.get_mut(&bootstrap_hash).and_then(|entry| {
|
||||
if entry.carrier_attempt == attempt
|
||||
@@ -97,7 +97,7 @@ impl WebProcessRuntime {
|
||||
}
|
||||
});
|
||||
drop(state);
|
||||
let Some(scores) = scores else { return };
|
||||
let Some(scores) = scores else { return false };
|
||||
self.trace.record_carrier_lifecycle(
|
||||
client_ip,
|
||||
identity.clone(),
|
||||
@@ -108,6 +108,7 @@ impl WebProcessRuntime {
|
||||
scores,
|
||||
None,
|
||||
);
|
||||
true
|
||||
}
|
||||
|
||||
/// Promotes one exact committed attempt after transport-specific health evidence.
|
||||
|
||||
@@ -276,13 +276,13 @@ impl WebProcessRuntime {
|
||||
now + Duration::from_secs(profile.carrier_negotiation_deadlines_secs[3]),
|
||||
);
|
||||
let learning_context = learning_epoch.map(|epoch| CarrierLearningContext {
|
||||
profile_key,
|
||||
client_ip,
|
||||
class: carrier_request.class(),
|
||||
user_agent_hash: carrier_request.user_agent_hash(),
|
||||
epoch,
|
||||
ip_learning_eligible,
|
||||
});
|
||||
profile_key,
|
||||
client_ip,
|
||||
class: carrier_request.class(),
|
||||
user_agent_hash: carrier_request.user_agent_hash(),
|
||||
epoch,
|
||||
ip_learning_eligible,
|
||||
});
|
||||
let session = WebSession::new(
|
||||
Arc::downgrade(self),
|
||||
session_hash,
|
||||
@@ -540,5 +540,4 @@ impl WebProcessRuntime {
|
||||
);
|
||||
Ok(result)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user