From 684c0e04a18ad166fd44d60483994a25a1060122 Mon Sep 17 00:00:00 2001
From: Philipp Balzarek
Date: Fri, 8 Mar 2013 13:14:21 +0100
Subject: [PATCH] log errors in reader thread
---
source/Network/Xmpp/Concurrent/Threads.hs | 2 ++
1 file changed, 2 insertions(+)
diff --git a/source/Network/Xmpp/Concurrent/Threads.hs b/source/Network/Xmpp/Concurrent/Threads.hs
index 452aa4c..56eb3e0 100644
--- a/source/Network/Xmpp/Concurrent/Threads.hs
+++ b/source/Network/Xmpp/Concurrent/Threads.hs
@@ -23,6 +23,7 @@ import Control.Concurrent.STM.TMVar
import GHC.IO (unsafeUnmask)
import Control.Monad.Error
+import System.Log.Logger
-- Worker to read stanzas from the stream and concurrently distribute them to
-- all listener threads.
@@ -49,6 +50,7 @@ readWorker onStanza onConnectionClosed stateRef =
return Nothing
, Ex.Handler $ \(e :: XmppFailure) -> do
onConnectionClosed e
+ errorM "Pontarius.Xmpp" $ "Read error: " ++ show e
return Nothing
]
case res of