From 492ecf32827ca43d91046c863cd9c34e2ce3dfb4 Mon Sep 17 00:00:00 2001 From: Joe Crayne Date: Tue, 28 Jan 2020 15:42:27 -0500 Subject: Handle exception on failed send-friendrequest. --- dht/ToxManager.hs | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'dht') 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 , friendRequestText = "XMPP friend request" } sendMessage tr route (mypub,Tox.OnionFriendRequest fr) + `catchIOError` \e -> do + let or = toxOnionRoutes $ txTox tx + nid = nodeId $ Tox.rendezvousNode $ Tox.rendezvous route + (rid,r)<- resolveRouteFromNodeId or nid + dput XMan $ unlines + $ [ "Error sending FriendRequest via " ++ show rid ++ " to " ++ show route + , " " ++ show e + ] ++ maybe [] (showRoute " ") r -- Seearch for friend's tox-id rendezvous and use the results to -- send our dht key. scheduleSearch announcer akey meth them -- cgit v1.2.3