After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 672979 - Add AboutToDisconnect signal
Add AboutToDisconnect signal
Status: RESOLVED DUPLICATE of bug 387832
Product: NetworkManager
Classification: Platform
Component: general
unspecified
Other Linux
: Normal enhancement
: ---
Assigned To: Dan Williams
Dan Williams
Depends on:
Blocks:
 
 
Reported: 2012-03-28 08:42 UTC by Guillaume Desmottes
Modified: 2012-04-28 16:35 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Guillaume Desmottes 2012-03-28 08:42:57 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?
Comment 1 Matthias Clasen 2012-03-29 00:54:45 UTC
the AboutToSleep signal is badly misdesigned, since it forces a 1-second wait. Not a good idea to copy that
Comment 2 Guillaume Desmottes 2012-03-29 07:31:30 UTC
What would you suggest? I think it's worth the wait if that can prevent users from loosing messages.
Comment 3 Dan Williams 2012-04-28 16:35:29 UTC
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 ***