better handling of connectivity changes: make CMs use GNetworkMonitor and/or netlink
Submitted by Guillaume Desmottes
Assigned to Telepathy bugs list
Original bug report: https://bugzilla.gnome.org/show_bug.cgi?id=659872
(I strongly suggest you to start reading Rob's bug reports on this issue).
- Connect your laptop to your docking station and make sure you have a wired (through the dock) and a wifi connection connected.
- Remove it from the docking station; the wired connectivity is lost and the wifi one becomes the default
- Empathy doesn't notice the connectivity change; each CM has to times out before reconnecting
Expected results: all the accounts are reconnected.
The main issue here is that we are relying exclusively on NM_STATE changes to detect connectivity changes. This used to work fine when NM was keeping only one connection at a time as a drop of this connection resulted in a state change. But that's not the case since NM can now be connected to different connections at the same time (typically a wired and a wifi connection).
We should track and watch the default active connection and react propertly when it's changed.