run xmpp test in bound thread

This commit is contained in:
Joey Hess 2012-10-26 14:38:04 -04:00
parent 07494cbb4b
commit 82b7e835e4
2 changed files with 2 additions and 1 deletions

View file

@ -76,7 +76,7 @@ data XMPPCreds = XMPPCreds
connectXMPP :: XMPPCreds -> (JID -> XMPP a) -> IO (Either SomeException ())
connectXMPP c a = case parseJID (xmppJID c) of
Nothing -> error "bad JID"
Just jid -> connectXMPP' jid c a
Just jid -> runInBoundThread $ connectXMPP' jid c a
{- Do a SRV lookup, but if it fails, fall back to the cached xmppHostname. -}
connectXMPP' :: JID -> XMPPCreds -> (JID -> XMPP a) -> IO (Either SomeException ())

View file

@ -26,6 +26,7 @@ import Network
import Network.Protocol.XMPP
import Data.Text (Text)
import qualified Data.Text as T
import Control.Concurrent
#endif
getXMPPR :: Handler RepHtml