summaryrefslogtreecommitdiff
path: root/dht/ToxManager.hs
diff options
context:
space:
mode:
Diffstat (limited to 'dht/ToxManager.hs')
-rw-r--r--dht/ToxManager.hs4
1 files changed, 3 insertions, 1 deletions
diff --git a/dht/ToxManager.hs b/dht/ToxManager.hs
index b0990430..25a4f0f2 100644
--- a/dht/ToxManager.hs
+++ b/dht/ToxManager.hs
@@ -709,6 +709,8 @@ forkAccountWatcher :: TVar (Map.Map Uniq24 AggregateSession)
709 -> TCP.RelayClient 709 -> TCP.RelayClient
710 -> Account JabberClients -> Tox JabberClients -> PresenceState Pending -> Announcer -> IO ThreadId 710 -> Account JabberClients -> Tox JabberClients -> PresenceState Pending -> Announcer -> IO ThreadId
711forkAccountWatcher ssvar tcp acc tox st announcer = forkIO $ do 711forkAccountWatcher ssvar tcp acc tox st announcer = forkIO $ do
712 let me = key2id $ toPublic $ userSecret acc
713 dput XMan $ "forkAccountWatcher(" ++ show me ++") started"
712 myThreadId >>= flip labelThread ("online:" 714 myThreadId >>= flip labelThread ("online:"
713 ++ show (key2id $ toPublic $ userSecret acc)) 715 ++ show (key2id $ toPublic $ userSecret acc))
714 (chan,cs) <- atomically $ do 716 (chan,cs) <- atomically $ do
@@ -738,10 +740,10 @@ forkAccountWatcher ssvar tcp acc tox st announcer = forkIO $ do
738 740
739 -- Stop tasks associated with each contact for this account. 741 -- Stop tasks associated with each contact for this account.
740 cs <- atomically $ readTVar (contacts acc) 742 cs <- atomically $ readTVar (contacts acc)
741 let me = key2id $ toPublic $ userSecret acc
742 forM_ (HashMap.toList cs) $ \(them,c) -> do 743 forM_ (HashMap.toList cs) $ \(them,c) -> do
743 stopConnecting tx (id2key them) "disabled account" 744 stopConnecting tx (id2key them) "disabled account"
744 closeSessions me them ssvar 745 closeSessions me them ssvar
746 dput XMan $ "forkAccountWatcher(" ++ show me ++") stopped"
745 747
746 748
747toxAnnounceInterval :: POSIXTime 749toxAnnounceInterval :: POSIXTime