summaryrefslogtreecommitdiff
path: root/dht/Announcer.hs
diff options
context:
space:
mode:
authorJoe Crayne <joe@jerkface.net>2020-01-11 21:27:43 -0500
committerJoe Crayne <joe@jerkface.net>2020-01-11 21:27:43 -0500
commitc3af9eb007c96c7fe816cc428f1e37881241b48c (patch)
tree297f2d7029fd992b8d1cd2cc74c25cb051f87ab1 /dht/Announcer.hs
parent6be7ff71f850e90f61c8f3b80b2b513b34891c57 (diff)
WIP: efforts regarding tcp-mediated connections.
Diffstat (limited to 'dht/Announcer.hs')
-rw-r--r--dht/Announcer.hs5
1 files changed, 4 insertions, 1 deletions
diff --git a/dht/Announcer.hs b/dht/Announcer.hs
index e7c0bcd2..bdbf5ecc 100644
--- a/dht/Announcer.hs
+++ b/dht/Announcer.hs
@@ -176,7 +176,10 @@ listener announcer = relisten
176 Just cmd -> return $ handleCommand cmd 176 Just cmd -> return $ handleCommand cmd
177 Nothing -> do 177 Nothing -> do
178 writeTVar (scheduled announcer) (Schedule queue') 178 writeTVar (scheduled announcer) (Schedule queue')
179 (fmap (>> relisten) (fmap fork (f announcer k now))) 179 io <- f announcer k now
180 return $ do
181 forkLabeled ("announcer:item:"++unpackAnnounceKey announcer k) io
182 relisten
180 where 183 where
181 modifyScheduled f = modifyTVar (scheduled announcer) (Schedule . f . unSchedule) 184 modifyScheduled f = modifyTVar (scheduled announcer) (Schedule . f . unSchedule)
182 declareInactive = writeTVar (announcerActive announcer) False 185 declareInactive = writeTVar (announcerActive announcer) False