summaryrefslogtreecommitdiff
path: root/dht/Presence/XMPPServer.hs
diff options
context:
space:
mode:
Diffstat (limited to 'dht/Presence/XMPPServer.hs')
-rw-r--r--dht/Presence/XMPPServer.hs11
1 files changed, 3 insertions, 8 deletions
diff --git a/dht/Presence/XMPPServer.hs b/dht/Presence/XMPPServer.hs
index e98b9a2e..de2dd5d3 100644
--- a/dht/Presence/XMPPServer.hs
+++ b/dht/Presence/XMPPServer.hs
@@ -65,12 +65,7 @@ import Control.Monad.Trans (lift)
65import Control.Monad.IO.Class (MonadIO, liftIO) 65import Control.Monad.IO.Class (MonadIO, liftIO)
66import Control.Monad.Fix (fix) 66import Control.Monad.Fix (fix)
67import Control.Monad 67import Control.Monad
68#ifdef THREAD_DEBUG 68import Control.Concurrent.ThreadUtil (forkIO,myThreadId,forkLabeled,labelThread,ThreadId,MVar,putMVar,takeMVar,newMVar)
69import Control.Concurrent.Lifted.Instrument (forkIO,myThreadId,labelThread,ThreadId,MVar,putMVar,takeMVar,newMVar)
70#else
71import Control.Concurrent.Lifted (forkIO,myThreadId,ThreadId)
72import GHC.Conc (labelThread)
73#endif
74import Control.Concurrent.STM 69import Control.Concurrent.STM
75import Data.List hiding ((\\)) 70import Data.List hiding ((\\))
76-- import Control.Concurrent.STM.TChan 71-- import Control.Concurrent.STM.TChan
@@ -344,7 +339,7 @@ conduitToChan c = do
344 chan <- atomically newLockedChan 339 chan <- atomically newLockedChan
345 clsrs <- atomically $ newTVar (Just []) 340 clsrs <- atomically $ newTVar (Just [])
346 quitvar <- atomically $ newEmptyTMVar 341 quitvar <- atomically $ newEmptyTMVar
347 forkIO $ do 342 forkLabeled "XMPP.conduitToChan" $ do
348 runConduit $ c .| copyToChannel id chan clsrs .| awaitForever (const $ return ()) 343 runConduit $ c .| copyToChannel id chan clsrs .| awaitForever (const $ return ())
349 atomically $ writeTVar clsrs Nothing 344 atomically $ writeTVar clsrs Nothing
350 return (chan,clsrs,quitvar) 345 return (chan,clsrs,quitvar)
@@ -462,7 +457,7 @@ sendReply donevar stype reply replychan = do
462 , stanzaOrigin = LocalPeer 457 , stanzaOrigin = LocalPeer
463 } 458 }
464 ioWriteChan replychan replyStanza 459 ioWriteChan replychan replyStanza
465 void . liftIO . forkIO $ do 460 void . liftIO . forkLabeled "XMPPServer.sendReply" $ do
466 mapM_ (liftIO . atomically . writeLChan (stanzaChan replyStanza)) reply 461 mapM_ (liftIO . atomically . writeLChan (stanzaChan replyStanza)) reply
467 liftIO . atomically $ writeTVar (stanzaClosers replyStanza) Nothing 462 liftIO . atomically $ writeTVar (stanzaClosers replyStanza) Nothing
468 -- liftIO $ wlog "finished reply stanza" 463 -- liftIO $ wlog "finished reply stanza"