mirror of
https://github.com/telemt/telemt.git
synced 2026-04-16 10:04:10 +03:00
Small frames as idle activity
Co-Authored-By: brekotis <93345790+brekotis@users.noreply.github.com>
This commit is contained in:
@@ -287,6 +287,10 @@ impl RelayClientIdleState {
|
|||||||
self.last_client_frame_at = now;
|
self.last_client_frame_at = now;
|
||||||
self.soft_idle_marked = false;
|
self.soft_idle_marked = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn on_client_tiny_frame(&mut self, now: Instant) {
|
||||||
|
self.last_client_frame_at = now;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl MeD2cFlushPolicy {
|
impl MeD2cFlushPolicy {
|
||||||
@@ -1989,6 +1993,7 @@ where
|
|||||||
};
|
};
|
||||||
|
|
||||||
if len == 0 {
|
if len == 0 {
|
||||||
|
idle_state.on_client_tiny_frame(Instant::now());
|
||||||
idle_state.tiny_frame_debt = idle_state
|
idle_state.tiny_frame_debt = idle_state
|
||||||
.tiny_frame_debt
|
.tiny_frame_debt
|
||||||
.saturating_add(TINY_FRAME_DEBT_PER_TINY);
|
.saturating_add(TINY_FRAME_DEBT_PER_TINY);
|
||||||
|
|||||||
Reference in New Issue
Block a user