summaryrefslogtreecommitdiff
path: root/src/Network/BitTorrent/DHT/Session.hs
diff options
context:
space:
mode:
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