diff options
Diffstat (limited to 'src/Network/BitTorrent/DHT/Session.hs')
-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. |