Skip to content

Commit

Permalink
gui: fix rare crash
Browse files Browse the repository at this point in the history
  • Loading branch information
mmcgee-jump committed Nov 9, 2024
1 parent 60e08ae commit 8fbd087
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions src/disco/gui/fd_gui.c
Original file line number Diff line number Diff line change
Expand Up @@ -1402,10 +1402,15 @@ fd_gui_handle_optimistically_confirmed_slot( fd_gui_t * gui,
for( ulong i=gui->summary.slot_optimistically_confirmed; i>=_slot; i-- ) {
fd_gui_slot_t * slot = gui->slots[ i % FD_GUI_SLOTS_CNT ];
if( FD_UNLIKELY( slot->slot==ULONG_MAX ) ) break;
FD_TEST( slot->slot==i );
slot->level = FD_GUI_SLOT_LEVEL_COMPLETED;
fd_gui_printf_slot( gui, i );
fd_http_server_ws_broadcast( gui->http );
if( FD_LIKELY( slot->slot==i ) ) {
/* It's possible for the optimistically confirmed slot to skip
backwards between two slots that we haven't yet replayed. In
that case we don't need to change anything, since they will
get marked properly when they get completed. */
slot->level = FD_GUI_SLOT_LEVEL_COMPLETED;
fd_gui_printf_slot( gui, i );
fd_http_server_ws_broadcast( gui->http );
}
}
}

Expand Down

0 comments on commit 8fbd087

Please sign in to comment.