summaryrefslogtreecommitdiff
path: root/src/Network/BitTorrent/DHT
diff options
context:
space:
mode:
authorjoe <joe@jerkface.net>2017-01-23 18:20:21 -0500
committerjoe <joe@jerkface.net>2017-01-23 18:20:21 -0500
commit6a2506745dd06ad0849a1b0d440ad9751a69cf81 (patch)
tree4247dab403788c344091858ce72c06ae4b042983 /src/Network/BitTorrent/DHT
parent9d1dad4af93598f403dae2d323539c60073f892d (diff)
New command "pid" to tell server's process id.
Diffstat (limited to 'src/Network/BitTorrent/DHT')
-rw-r--r--src/Network/BitTorrent/DHT/Session.hs5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/Network/BitTorrent/DHT/Session.hs b/src/Network/BitTorrent/DHT/Session.hs
index c08021c7..8dc3f7ac 100644
--- a/src/Network/BitTorrent/DHT/Session.hs
+++ b/src/Network/BitTorrent/DHT/Session.hs
@@ -395,8 +395,9 @@ routableAddress = do
395myNodeIdAccordingTo :: NodeAddr ip -> DHT ip NodeId 395myNodeIdAccordingTo :: NodeAddr ip -> DHT ip NodeId
396myNodeIdAccordingTo _ = do 396myNodeIdAccordingTo _ = do
397 info <- asks routingInfo >>= liftIO . atomically . readTVar 397 info <- asks routingInfo >>= liftIO . atomically . readTVar
398 fallback <- asks tentativeNodeId 398 maybe (asks tentativeNodeId)
399 return $ maybe fallback myNodeId info 399 (return . myNodeId)
400 info
400 401
401-- | Get current routing table. Normally you don't need to use this 402-- | Get current routing table. Normally you don't need to use this
402-- function, but it can be usefull for debugging and profiling purposes. 403-- function, but it can be usefull for debugging and profiling purposes.