summaryrefslogtreecommitdiff
path: root/Assistant/Threads/NetWatcher.hs
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/NetWatcher.hs
parentb4f43466b1100b158d2a69c01e646896ba34494f (diff)
parent0a87d90900949e6f7e75ab2ac83b4135746d7602 (diff)
Merge branch 'master' into xmpp
Conflicts: Assistant/Threads/MountWatcher.hs Assistant/Threads/NetWatcher.hs
Diffstat (limited to 'Assistant/Threads/NetWatcher.hs')
-rw-r--r--Assistant/Threads/NetWatcher.hs5
1 files changed, 3 insertions, 2 deletions
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