summaryrefslogtreecommitdiff
path: root/src/Network/BitTorrent/DHT/Session.hs
diff options
context:
space:
mode:
authorSam Truzjan <pxqr.sta@gmail.com>2014-02-24 02:26:05 +0400
committerSam Truzjan <pxqr.sta@gmail.com>2014-02-24 02:26:05 +0400
commit04815747e3a9b80ee2fbe37a8e5636ab42c33bdf (patch)
tree8748dfc38b7aa4ebbe9eac167c620aac3a14efde /src/Network/BitTorrent/DHT/Session.hs
parent279ea9c29e0f61541ea0281678412d6dc6586d60 (diff)
Minor changes
Diffstat (limited to 'src/Network/BitTorrent/DHT/Session.hs')
-rw-r--r--src/Network/BitTorrent/DHT/Session.hs1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/Network/BitTorrent/DHT/Session.hs b/src/Network/BitTorrent/DHT/Session.hs
index 43bd65e5..755985fc 100644
--- a/src/Network/BitTorrent/DHT/Session.hs
+++ b/src/Network/BitTorrent/DHT/Session.hs
@@ -212,6 +212,7 @@ nullSessionTokens = SessionTokens
212 <*> liftIO getCurrentTime 212 <*> liftIO getCurrentTime
213 <*> pure defaultUpdateInterval 213 <*> pure defaultUpdateInterval
214 214
215-- TODO invalidate *twice* if needed
215invalidateTokens :: UTCTime -> SessionTokens -> SessionTokens 216invalidateTokens :: UTCTime -> SessionTokens -> SessionTokens
216invalidateTokens curTime ts @ SessionTokens {..} 217invalidateTokens curTime ts @ SessionTokens {..}
217 | curTime `diffUTCTime` lastUpdate > maxInterval = SessionTokens 218 | curTime `diffUTCTime` lastUpdate > maxInterval = SessionTokens