Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lib: Fix race condition in "double dialog" error check #19616

Merged
merged 1 commit into from
Nov 16, 2023

Commits on Nov 16, 2023

  1. lib: Fix race condition in "double dialog" error check

    useState() setters are async. c-podman and navigator call
    `Dialogs.close(); Dialogs.show(...)` in direct succession. In that case,
    Dialogs.show() does not yet see the updated `null` value for `dialog`
    and logs the error, which fails the test.
    
    To avoid that, use a ref for "is the dialog open", which is synchronous.
    martinpitt committed Nov 16, 2023
    Configuration menu
    Copy the full SHA
    c1e8a8f View commit details
    Browse the repository at this point in the history