summaryrefslogtreecommitdiff
path: root/dht/Announcer.hs
diff options
context:
space:
mode:
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