fix: stale data on wifi widget#2480
fix: stale data on wifi widget#2480danielepintore wants to merge 2 commits intonoctalia-dev:mainfrom
Conversation
|
The onResumed() function is unnecessary, the monitor process already triggers in this case. I think adding the scan there is enough to fix the problem with the stale SSID. |
|
The scan is taking so much time due to |
|
So if I've understood correctly I've to find a way to update the data without calling |
Correct. In a perfect world, we shouldn't have store networks, instead read from dbus/iwd/wpa_supplicant/nm directly, (which one is most convenient) but that's wasn't possible at the time due to lack of API or dbus interface (within shell) didn't existed. I wasn't allowed to write a noctalia-networkd and offload all the work and still not allowed to. 3-4 seconds actually acceptable tbh, i've saw worse (20 seconds sometimes or more) edit: whenever you run scan in terminal, it has no effect to shell. |
From what i remember without adding secondary scan_fast() is not worth (to me) worth the complexity it brings. I've tried making the interface in python it didn't bring 'expected' improvement either. What you're seen it was best effort, without changing how things work. |
|
I think to address the problem with stale data the current PR is fine given that this will be reworked anyway in v5? I would only drop the |
data is stale because fetching new one taking (I already mentioned... There is no good way to fix it, at this point not worth bothering) long, and yes within v5 this should not be an issue. |
Pull Request
If this PR is not ready for review yet, please mark it as Draft until it's good to be reviewed.
Motivation
closes #2184
I have noticed that when I am connected to a network and suspend my laptop, the Wi-Fi widget displays stale SSID data from the previous connection upon resuming in a new location. A similar issue occurs during automatic failover: if the primary connection drops and the system automatically connects to a saved hotspot, the SSID name in the status bar remains unchanged despite the successful reconnection.
This pull requests forces a scan to update the network list and reflect the latest changes when those events occur. I've also implemented a mechanism to start again
nmcli -t monitorif the process for some reason hangs or exitsType of Change
Mark the relevant option with an "x".
Related Issue
Testing
Describe how you tested your changes and mark the relevant items.
Screenshots / Videos
If applicable, include screenshots or videos to help illustrate your changes.
Checklist