Browse Source

log errors in reader thread

master
Philipp Balzarek 13 years ago
parent
commit
684c0e04a1
  1. 2
      source/Network/Xmpp/Concurrent/Threads.hs

2
source/Network/Xmpp/Concurrent/Threads.hs

@ -23,6 +23,7 @@ import Control.Concurrent.STM.TMVar
import GHC.IO (unsafeUnmask) import GHC.IO (unsafeUnmask)
import Control.Monad.Error import Control.Monad.Error
import System.Log.Logger
-- Worker to read stanzas from the stream and concurrently distribute them to -- Worker to read stanzas from the stream and concurrently distribute them to
-- all listener threads. -- all listener threads.
@ -49,6 +50,7 @@ readWorker onStanza onConnectionClosed stateRef =
return Nothing return Nothing
, Ex.Handler $ \(e :: XmppFailure) -> do , Ex.Handler $ \(e :: XmppFailure) -> do
onConnectionClosed e onConnectionClosed e
errorM "Pontarius.Xmpp" $ "Read error: " ++ show e
return Nothing return Nothing
] ]
case res of case res of

Loading…
Cancel
Save