Merge branch 'master' into xmpp
Conflicts: Assistant/Threads/MountWatcher.hs Assistant/Threads/NetWatcher.hs
This commit is contained in:
commit
0b1cf3a766
20 changed files with 196 additions and 24 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue