Skip to content

Commit 5f572c2

Browse files
committed
Update desktop_event_transport.rs
1 parent 1a4fa0e commit 5f572c2

1 file changed

Lines changed: 1 addition & 14 deletions

File tree

packages/tauri-app/src-tauri/src/desktop_event_transport.rs

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,7 @@ const EVENT_STATUS_NAME: &str = "desktop:event-stream-status";
1717
const FLUSH_INTERVAL_MS: u64 = 16;
1818
const DELTA_STREAM_WINDOW_MS: u64 = 48;
1919
const ACTIVE_STREAM_DISPLAY_WINDOW_MS: u64 = 32;
20-
const ACTIVE_STREAM_STORE_WINDOW_MS: u64 = 180;
2120
const ACTIVE_STREAM_DISPLAY_CHUNK_MAX: usize = 192;
22-
const ACTIVE_STREAM_STORE_CHUNK_MAX: usize = 1536;
2321
const MAX_BATCH_EVENTS: usize = 256;
2422
const DEFAULT_RECONNECT_INITIAL_DELAY_MS: u64 = 1_000;
2523
const DEFAULT_RECONNECT_MAX_DELAY_MS: u64 = 10_000;
@@ -553,16 +551,6 @@ impl ActiveTextAssembler {
553551
entry.last_display_emit = now;
554552
}
555553

556-
if !entry.store_pending.is_empty()
557-
&& (now.duration_since(entry.last_store_emit)
558-
>= Duration::from_millis(ACTIVE_STREAM_STORE_WINDOW_MS)
559-
|| entry.store_pending.chars().count() >= ACTIVE_STREAM_STORE_CHUNK_MAX)
560-
{
561-
emitted.push(make_message_part_delta_event(entry, &entry.store_pending));
562-
entry.store_pending.clear();
563-
entry.last_store_emit = now;
564-
}
565-
566554
emitted
567555
}
568556

@@ -1821,8 +1809,7 @@ mod tests {
18211809
},
18221810
now,
18231811
);
1824-
let emitted =
1825-
assembler.take_due(now + Duration::from_millis(ACTIVE_STREAM_STORE_WINDOW_MS + 1));
1812+
let emitted = assembler.flush_store_only_all(now + Duration::from_millis(1));
18261813

18271814
assert!(emitted.iter().any(|event| {
18281815
coalesced_payload_event(event)

0 commit comments

Comments
 (0)