summaryrefslogtreecommitdiff
path: root/Assistant/Threads
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2012-10-26 00:10:41 -0400
committerGravatar Joey Hess <joey@kitenet.net>2012-10-26 00:10:41 -0400
commit89a33e4ce1219dff81f6c5fd296b6e6ba6866ea3 (patch)
treed5d88ff78f40fd9e4fc932a5ccfadcf9b17fdd31 /Assistant/Threads
parentb4f43466b1100b158d2a69c01e646896ba34494f (diff)
parent0a87d90900949e6f7e75ab2ac83b4135746d7602 (diff)
Merge branch 'master' into xmpp
Conflicts: Assistant/Threads/MountWatcher.hs Assistant/Threads/NetWatcher.hs
Diffstat (limited to 'Assistant/Threads')
-rw-r--r--Assistant/Threads/MountWatcher.hs5
-rw-r--r--Assistant/Threads/NetWatcher.hs5
2 files changed, 6 insertions, 4 deletions
diff --git a/Assistant/Threads/MountWatcher.hs b/Assistant/Threads/MountWatcher.hs
index c36b544a7..881f9d8d6 100644
--- a/Assistant/Threads/MountWatcher.hs
+++ b/Assistant/Threads/MountWatcher.hs
@@ -52,7 +52,8 @@ mountWatcherThread st handle scanremotes pushnotifier = thread $
#if WITH_DBUS
dbusThread :: ThreadState -> DaemonStatusHandle -> ScanRemoteMap -> PushNotifier -> IO ()
-dbusThread st dstatus scanremotes pushnotifier = E.catch (go =<< connectSession) onerr
+dbusThread st dstatus scanremotes pushnotifier =
+ E.catch (runClient getSessionAddress go) onerr
where
go client = ifM (checkMountMonitor client)
( do
@@ -74,7 +75,7 @@ dbusThread st dstatus scanremotes pushnotifier = E.catch (go =<< connectSession)
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 pushnotifier
diff --git a/Assistant/Threads/NetWatcher.hs b/Assistant/Threads/NetWatcher.hs
index 2c637f414..5e6fcea06 100644
--- a/Assistant/Threads/NetWatcher.hs
+++ b/Assistant/Threads/NetWatcher.hs
@@ -58,7 +58,8 @@ netWatcherFallbackThread st dstatus scanremotes pushnotifier = thread $
#if WITH_DBUS
dbusThread :: ThreadState -> DaemonStatusHandle -> ScanRemoteMap -> PushNotifier -> IO ()
-dbusThread st dstatus scanremotes pushnotifier = E.catch (go =<< connectSystem) onerr
+dbusThread st dstatus scanremotes pushnotifier =
+ E.catch (runClient getSystemAddress go) onerr
where
go client = ifM (checkNetMonitor client)
( do
@@ -70,7 +71,7 @@ dbusThread st dstatus scanremotes pushnotifier = E.catch (go =<< connectSystem)
)
onerr :: E.SomeException -> IO ()
onerr e = runThreadState st $
- warning $ "Failed to use dbus; falling back to polling (" ++ show e ++ ")"
+ warning $ "dbus failed; falling back to polling (" ++ show e ++ ")"
handle = do
debug thisThread ["detected network connection"]
handleConnection st dstatus scanremotes pushnotifier