GNOME Bugzilla – Bug 672979
Add AboutToDisconnect signal
Last modified: 2012-04-28 16:35:29 UTC
UPower has an AboutToSleep D-Bus signal which is fired just before putting the computer to sleep (there is a one second delay I think). telepathy-mission-control catches this signal and tries to properly disconnect all the IM connections right away. This is of course racy (we can't be sure that connections will have time to disconnect) but proofed to be useful in practice and can save from loosing IM messages while the connection is timeouting. What about adding a similar signal in NetworkManager announcing when it's about to change network?
the AboutToSleep signal is badly misdesigned, since it forces a 1-second wait. Not a good idea to copy that
What would you suggest? I think it's worth the wait if that can prevent users from loosing messages.
NM at some point here should grow the capability to run "pre-down" actions and allow clients to clean up for a short period of time (a few seconds) before taking down the network connection. This is already covered in bug 387832. Note that this state will obviously be *advisory* and may not be emitted when the network has already been disconnected by external events (loss of signal, cable unplugged, etc). *** This bug has been marked as a duplicate of bug 387832 ***