mirror of
https://github.com/telemt/telemt.git
synced 2026-11-02 05:42:00 +03:00
Hardswap Invariants in tests + Quota fixes
This commit is contained in:
@@ -69,6 +69,9 @@ impl WebSession {
|
||||
if !self.carrier().is_multiplexed() {
|
||||
return Err(ManagerError::Protocol);
|
||||
}
|
||||
if self.close_if_cancelled() {
|
||||
return Err(ManagerError::Closed);
|
||||
}
|
||||
if self
|
||||
.up_active
|
||||
.compare_exchange(false, true, Ordering::AcqRel, Ordering::Acquire)
|
||||
@@ -157,6 +160,10 @@ impl WebSession {
|
||||
if matches!(result, Err(ManagerError::Backpressure)) {
|
||||
return result;
|
||||
}
|
||||
if matches!(result, Err(ManagerError::Closed)) && self.close_if_cancelled() {
|
||||
drop(opened);
|
||||
return result;
|
||||
}
|
||||
if result.is_err() {
|
||||
self.close(SessionCloseReason::Protocol);
|
||||
drop(opened);
|
||||
|
||||
Reference in New Issue
Block a user