diff options
author | Joey Hess <joey@kitenet.net> | 2012-10-26 00:02:03 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2012-10-26 00:02:03 -0400 |
commit | 0a87d90900949e6f7e75ab2ac83b4135746d7602 (patch) | |
tree | 9cf899ad4878c6906ecdb60d000636cb5a01ed04 /Assistant/Threads/MountWatcher.hs | |
parent | 5b10750146bc036cba2c9798803b61e69f180360 (diff) |
improved dbus error handling
Now when the dbus connection is dropped, it'll fall back to polling.
I could make it try to reconnect, but there's a FD leak in the dbus
library, so not yet.
Diffstat (limited to 'Assistant/Threads/MountWatcher.hs')
-rw-r--r-- | Assistant/Threads/MountWatcher.hs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Assistant/Threads/MountWatcher.hs b/Assistant/Threads/MountWatcher.hs index 462f5843c..294f9a972 100644 --- a/Assistant/Threads/MountWatcher.hs +++ b/Assistant/Threads/MountWatcher.hs @@ -51,7 +51,7 @@ mountWatcherThread st handle scanremotes = thread $ #if WITH_DBUS dbusThread :: ThreadState -> DaemonStatusHandle -> ScanRemoteMap -> IO () -dbusThread st dstatus scanremotes = E.catch (go =<< connectSession) onerr +dbusThread st dstatus scanremotes = E.catch (runClient getSessionAddress go) onerr where go client = ifM (checkMountMonitor client) ( do @@ -73,7 +73,7 @@ dbusThread st dstatus scanremotes = E.catch (go =<< connectSession) onerr onerr :: E.SomeException -> IO () onerr e = do runThreadState st $ - warning $ "Failed to use dbus; falling back to mtab polling (" ++ show e ++ ")" + warning $ "dbus failed; falling back to mtab polling (" ++ show e ++ ")" pollinstead pollinstead = pollingThread st dstatus scanremotes |