mirror of
https://github.com/telemt/telemt.git
synced 2026-10-11 03:45:58 +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:
@@ -55,7 +55,14 @@ impl WebSession {
|
||||
.is_some_and(|value| value.frame_type != FrameType::Open)
|
||||
&& only_late_frames(&frames)
|
||||
{
|
||||
return Ok(sequence);
|
||||
return if self.automatic_carrier
|
||||
&& state.negotiation_phase
|
||||
!= super::SessionNegotiationPhase::Committed
|
||||
{
|
||||
Err(ManagerError::Backpressure)
|
||||
} else {
|
||||
Ok(sequence)
|
||||
};
|
||||
}
|
||||
if lane_id == 0
|
||||
|| frames
|
||||
@@ -160,6 +167,10 @@ impl WebSession {
|
||||
drop(opened);
|
||||
return result;
|
||||
}
|
||||
if self.automatic_carrier && !self.is_carrier_committed() {
|
||||
self.lane_open_notify.notify_waiters();
|
||||
return Err(ManagerError::Backpressure);
|
||||
}
|
||||
if committed {
|
||||
self.finish_carrier_commit();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user