From d1eea83c508c3a977c5423597f3174cfd86b108d Mon Sep 17 00:00:00 2001 From: James Crayne Date: Sat, 3 Nov 2018 06:37:40 -0400 Subject: debug message on sendLossless result --- src/Network/Tox/AggregateSession.hs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/Network/Tox') diff --git a/src/Network/Tox/AggregateSession.hs b/src/Network/Tox/AggregateSession.hs index 27258a6f..edb897e0 100644 --- a/src/Network/Tox/AggregateSession.hs +++ b/src/Network/Tox/AggregateSession.hs @@ -242,7 +242,11 @@ dispatchMessage c msid msg = join $ atomically $ do imap <- readTVar (contactSession c) let go = case msid of Nothing -> forM_ imap Just sid -> forM_ (IntMap.lookup sid imap) - return $ go $ \con -> sendLossless (transportCrypto (ncAllSessions (singleSession con))) (singleSession con) msg + return $ go $ \con -> do + eResult <- sendLossless (transportCrypto (ncAllSessions (singleSession con))) (singleSession con) msg + case eResult of + Left msg -> dput XJabber msg + Right pkt -> dput XJabber ("sendLossLess SUCCESS: " ++ show pkt) -- | Retry until: -- -- cgit v1.2.3