Skip to content

Commit

Permalink
Remove mux-server race condition.
Browse files Browse the repository at this point in the history
New changes were being lost, and not sent to the
client, if they occurred during the time previous
updates were being processed.
  • Loading branch information
loops committed Aug 17, 2024
1 parent 30345b3 commit 3a17259
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions wezterm-mux-server-impl/src/sessionhandler.rs
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,11 @@ impl PerPane {
changed = true;
}

let old_seqno = self.seqno;
self.seqno = pane.get_current_seqno();
let mut all_dirty_lines = pane.get_changed_since(
0..dims.physical_top + dims.viewport_rows as StableRowIndex,
self.seqno,
old_seqno,
);
if !all_dirty_lines.is_empty() {
changed = true;
Expand Down Expand Up @@ -124,7 +126,6 @@ impl PerPane {
self.working_dir = working_dir.clone();
self.dimensions = dims;
self.mouse_grabbed = mouse_grabbed;
self.seqno = pane.get_current_seqno();

let bonus_lines = bonus_lines.into();
Some(GetPaneRenderChangesResponse {
Expand Down

0 comments on commit 3a17259

Please sign in to comment.