GNOME Bugzilla – Bug 784629
nmcli networking connectivity check shows previous state
Last modified: 2017-10-03 10:01:54 UTC
Hi, When running "nmcli networking connectivity check" it seems that nmcli returns the old state, not the new one. The nmcli call blocks for a new seconds and the icon in gnome-shell change from limited to fill connectivity but the command still returns "limited". The next call to "nmcli networking connectivity" shows the proper state $ nmcli networking connectivity limité $ nmcli networking connectivity check limité << gnome-shell icon is now showing full connectivity $ nmcli networking connectivity plein The connectivity plugin is configured with an url
Created attachment 356479 [details] [review] [PATCH] libnm: update property in the manager after connectivity check
Hey, What's the status of this patch? Doesn't seems be be merged yet?
(In reply to Beniamino Galvani from comment #1) > Created attachment 356479 [details] [review] [review] > [PATCH] libnm: update property in the manager after connectivity check there is a race here: - server sends PropertyChanged(CONNECTIVITY_NONE) - clients makes sync request - connectivity changes, and server answers CONNECTIVITY_FULL and issues PropertyChanged(CONNECTIVITY_FULL) signal - client updates connectivity due to response. - client processes obsolete CONNECTIVITY_NONE signal which introduces an invalid state. - client processes the second PropertyChanged signal, and fixes the connectivity state. It is a bad idea to interleave synchronous responses with a stream of incoming asynchronous events. Not that I really mind. The fallacy is to have synchronous requests in the first place. Hence, the patch lgtm.
Patch applied to master: https://cgit.freedesktop.org/NetworkManager/NetworkManager/commit/?id=b799de281bc01073c31dd2c86171b29c8132441c and nm-1-8: https://cgit.freedesktop.org/NetworkManager/NetworkManager/commit/?h=nm-1-8&id=883f34853474fd8ea142f6c640810ed2562f09dc