diff options
author | joe <joe@jerkface.net> | 2017-01-23 18:20:21 -0500 |
---|---|---|
committer | joe <joe@jerkface.net> | 2017-01-23 18:20:21 -0500 |
commit | 6a2506745dd06ad0849a1b0d440ad9751a69cf81 (patch) | |
tree | 4247dab403788c344091858ce72c06ae4b042983 /src | |
parent | 9d1dad4af93598f403dae2d323539c60073f892d (diff) |
New command "pid" to tell server's process id.
Diffstat (limited to 'src')
-rw-r--r-- | src/Network/BitTorrent/DHT/Session.hs | 5 |
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 | |||
395 | myNodeIdAccordingTo :: NodeAddr ip -> DHT ip NodeId | 395 | myNodeIdAccordingTo :: NodeAddr ip -> DHT ip NodeId |
396 | myNodeIdAccordingTo _ = do | 396 | myNodeIdAccordingTo _ = 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. |