Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Give network monitor time to figure things out
Inside flatpak network monitor starts out assuming that it's disconnected, and then makes an async call to the portal to get the current state of affairs. Hence, if we check connectivity right after constructing the default monitor instance we're caught in the initial state and never see the actual state of the network. To work around this just wait for 0.5s and hope that network monitor figured things out by then. The proper way would be to listen for the notify::connectivity signal, but that's a tad more complicated to get right, and seems like overkill for a debug report. See https://gitlab.gnome.org/GNOME/glib/-/issues/1718 for background.
- Loading branch information