summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoe Crayne <joe@jerkface.net>2020-01-28 15:42:27 -0500
committerJoe Crayne <joe@jerkface.net>2020-01-28 17:26:25 -0500
commit492ecf32827ca43d91046c863cd9c34e2ce3dfb4 (patch)
treebae2757b58895866cc921215c3f9bbfe2ac545de
parent68cf0f1981ef94ecd94a0f9c657aa132165f7ed0 (diff)
Handle exception on failed send-friendrequest.
-rw-r--r--dht/ToxManager.hs8
1 files changed, 8 insertions, 0 deletions
diff --git a/dht/ToxManager.hs b/dht/ToxManager.hs
index c0717083..1430169f 100644
--- a/dht/ToxManager.hs
+++ b/dht/ToxManager.hs
@@ -682,6 +682,14 @@ startConnecting0 tx them contact reason = do
682 , friendRequestText = "XMPP friend request" 682 , friendRequestText = "XMPP friend request"
683 } 683 }
684 sendMessage tr route (mypub,Tox.OnionFriendRequest fr) 684 sendMessage tr route (mypub,Tox.OnionFriendRequest fr)
685 `catchIOError` \e -> do
686 let or = toxOnionRoutes $ txTox tx
687 nid = nodeId $ Tox.rendezvousNode $ Tox.rendezvous route
688 (rid,r)<- resolveRouteFromNodeId or nid
689 dput XMan $ unlines
690 $ [ "Error sending FriendRequest via " ++ show rid ++ " to " ++ show route
691 , " " ++ show e
692 ] ++ maybe [] (showRoute " ") r
685 -- Seearch for friend's tox-id rendezvous and use the results to 693 -- Seearch for friend's tox-id rendezvous and use the results to
686 -- send our dht key. 694 -- send our dht key.
687 scheduleSearch announcer akey meth them 695 scheduleSearch announcer akey meth them