summaryrefslogtreecommitdiff
path: root/dht/ToxManager.hs
diff options
context:
space:
mode:
authorJoe Crayne <joe@jerkface.net>2020-01-25 03:11:44 -0500
committerJoe Crayne <joe@jerkface.net>2020-01-25 19:18:12 -0500
commit782aada5511ce8bdf8ae63fee189e6c0c9481e1d (patch)
treede1d57fedc6cf9b311f319d7af2130439586753c /dht/ToxManager.hs
parent938ef8b447e975a39121104b4206cd149a2f911e (diff)
getContactInfo: Send optional TCP connection requests.
Diffstat (limited to 'dht/ToxManager.hs')
-rw-r--r--dht/ToxManager.hs4
1 files changed, 3 insertions, 1 deletions
diff --git a/dht/ToxManager.hs b/dht/ToxManager.hs
index c1112a05..19db77ec 100644
--- a/dht/ToxManager.hs
+++ b/dht/ToxManager.hs
@@ -646,7 +646,9 @@ startConnecting0 tx them contact reason = do
646 let meth = SearchMethod (toxQSearch tox) onResult (nearNodes tox) (key2id them) 30 646 let meth = SearchMethod (toxQSearch tox) onResult (nearNodes tox) (key2id them) 30
647 where 647 where
648 onResult theirkey rendezvous = do 648 onResult theirkey rendezvous = do
649 dkey <- Tox.getContactInfo tox 649 mTheirDHTKey <- atomically $ fmap ((,) (txTCP tx)) <$> contactDHTKey contact
650 dkey <- Tox.getContactInfo mTheirDHTKey tox
651
650 let tr = Tox.toxToRoute tox 652 let tr = Tox.toxToRoute tox
651 route = Tox.AnnouncedRendezvous theirkey rendezvous 653 route = Tox.AnnouncedRendezvous theirkey rendezvous
652 dput XMan $ unwords [ take 8 (show $ key2id theirkey) 654 dput XMan $ unwords [ take 8 (show $ key2id theirkey)