NetWatcher: When dbus connection is lost, try to reconnect.

MountWatcher can't do this, because it uses the session dbus,
and won't have access to the new DBUS_SESSION_BUS_ADDRESS if a new session
is started.

Bumped dbus library version, FD leak in it is fixed.
This commit is contained in:
Joey Hess 2012-10-26 19:38:27 -04:00
parent 87c250da5b
commit 8e4620a6c7
6 changed files with 25 additions and 18 deletions

View file

@ -72,6 +72,11 @@ dbusThread st dstatus scanremotes = E.catch (runClient getSessionAddress go) one
)
onerr :: E.SomeException -> IO ()
onerr e = do
{- If the session dbus fails, the user probably
- logged out of their desktop. Even if they log
- back in, we won't have access to the dbus
- session key, so polling is the best that can be
- done in this situation. -}
runThreadState st $
warning $ "dbus failed; falling back to mtab polling (" ++ show e ++ ")"
pollinstead