Skip to content

Fix liveview browser freeze from inifinite loop - #5858

Open
mcmah309 wants to merge 1 commit into
DioxusLabs:mainfrom
mcmah309:fix/liveview-eval-recv-freeze
Open

mcmah309 wants to merge 1 commit into
DioxusLabs:mainfrom
mcmah309:fix/liveview-eval-recv-freeze

Conversation

@mcmah309

Copy link
Copy Markdown
Contributor

Waiting for a Rust message could trap JavaScript in an infinite loop. The previous recv() waited 50 ms, then executed:

  while (true) {
      let __data = _message_queue.shift();
      if (__data) {
          __msg = __data;
          break;
      }
  }

If the queue was empty, this loop never yielded. The browser could no longer process clicks, render updates, or execute the WebSocket handler that delivers the awaited message. The receiver blocked the very mechanism needed to unblock it. The timeout only delayed entering the loop; it did not make the loop asynchronous.

@nikuda

nikuda commented Sep 23, 2026

Copy link
Copy Markdown

Same issue addressed here #5848

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants