mirror of
https://github.com/netbirdio/netbird.git
synced 2026-07-17 03:59:56 +00:00
startLogin held both guards (the module-level loginInFlight and the caller's React-level loginGuard) across the post-failure errorDialog await. The native Windows MessageBox disables its parent for its whole lifetime while the main window's WindowClosing hook hides instead of closing, so the dialog promise can outlive the click — and even a clean dismissal kept the guards held until the promise settled. Until then every later Connect click and tray trigger-login was silently dropped at the guard check, so the only way back was a client restart. Release both guards the instant the flow itself settles, before the dialog: startLogin now takes an onSettled callback fired in its finally (driveLogin releases loginGuard through it), and the errorDialog await moved out of the try/finally so no guard is ever gated on the dialog.